File size: 943 Bytes
2547be1
 
62a4041
723ebe4
2547be1
723ebe4
2547be1
 
 
 
 
 
d0109c7
723ebe4
2547be1
723ebe4
 
 
 
5076875
2547be1
723ebe4
 
56c06a1
723ebe4
2547be1
 
723ebe4
 
2547be1
 
723ebe4
9a4db95
723ebe4
2547be1
723ebe4
2547be1
723ebe4
62a4041
2547be1
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
"""Streamlit main entrance; modularized for clarity"""

import streamlit as st

from modules.callbacks import init_session_state

from modules.ui_components import (
    render_sidebar,
    render_results_column,
    render_input_column,
    load_css,
)


# --- Page Setup (Called only ONCE) ---
st.set_page_config(
    page_title="ML Polymer Classification",
    page_icon="🔬",
    layout="wide",
    initial_sidebar_state="expanded",
    menu_items={"Get help": "https://github.com/KLab-AI3/ml-polymer-recycling"},
)


def main():
    """Modularized main content to other scripts to clean the main app"""
    load_css("static/style.css")
    init_session_state()

    # Render UI components
    render_sidebar()

    col1, col2 = st.columns([1, 1.35], gap="small")
    with col1:
        render_input_column()
    with col2:
        render_results_column()


if __name__ == "__main__":
    main()