devjas1 commited on
Commit
0218933
·
1 Parent(s): d351301

(CONFIG/NAME)[Implement Upload_and_Run.py and Update References]: Change landing page name `app.py` → `Upload_and_Run.py` for main application logic and update README and Dockerfile to reflect new entry point.

Browse files
Files changed (3) hide show
  1. Dockerfile +1 -1
  2. README.md +2 -2
  3. Upload_and_Run.py +72 -0
Dockerfile CHANGED
@@ -18,4 +18,4 @@ EXPOSE 8501
18
 
19
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
20
 
21
- ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
18
 
19
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
20
 
21
+ ENTRYPOINT ["streamlit", "run", "Upload_and_Run.py", "--server.port=8501", "--server.address=0.0.0.0"]
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 🔬
4
  colorFrom: indigo
5
  colorTo: yellow
6
  sdk: streamlit
7
- app_file: app.py
8
  pinned: false
9
  license: apache-2.0
10
  ---
@@ -106,7 +106,7 @@ _Resources, Conservation & Recycling_, **188**, 106718.
106
 
107
  **The system is built on a modular, production-ready architecture designed for scalability and maintainability.**
108
 
109
- - **Frontend**: Streamlit-based web application (`app.py`) with interactive, multi-tab UI.
110
  - **Backend**: PyTorch for deep learning operations including model loading and inference.
111
  - **Model Management**: Registry pattern (`models/registry.py`) for dynamic model loading and easy integration of new architectures.
112
  - **Data Processing**: Modality-aware preprocessing pipeline (`utils/preprocessing.py`) for data integrity and standardization (Raman & FTIR).
 
4
  colorFrom: indigo
5
  colorTo: yellow
6
  sdk: streamlit
7
+ app_file: Upload_and_Run.py
8
  pinned: false
9
  license: apache-2.0
10
  ---
 
106
 
107
  **The system is built on a modular, production-ready architecture designed for scalability and maintainability.**
108
 
109
+ - **Frontend**: Streamlit-based web application (`Upload_and_Run.py`) with interactive, multi-tab UI.
110
  - **Backend**: PyTorch for deep learning operations including model loading and inference.
111
  - **Model Management**: Registry pattern (`models/registry.py`) for dynamic model loading and easy integration of new architectures.
112
  - **Data Processing**: Modality-aware preprocessing pipeline (`utils/preprocessing.py`) for data integrity and standardization (Raman & FTIR).
Upload_and_Run.py ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # In Upload_and_Run.py
2
+ import streamlit as st
3
+
4
+ from modules.callbacks import init_session_state
5
+
6
+ from modules.ui_components import (
7
+ render_sidebar,
8
+ render_results_column,
9
+ render_input_column,
10
+ render_comparison_tab,
11
+ render_performance_tab,
12
+ load_css,
13
+ )
14
+
15
+ from modules.training_ui import render_training_tab
16
+
17
+ from utils.image_processing import render_image_upload_interface
18
+
19
+ st.set_page_config(
20
+ page_title="ML Polymer Classification",
21
+ page_icon="🔬",
22
+ layout="wide",
23
+ initial_sidebar_state="expanded",
24
+ menu_items=None,
25
+ )
26
+
27
+
28
+ def main():
29
+ """Modularized main content to other scripts to clean the main app"""
30
+ load_css("static/style.css")
31
+ init_session_state()
32
+
33
+ render_sidebar()
34
+
35
+ # Create main tabs for different analysis modes
36
+ tab1, tab2, tab3, tab4, tab5 = st.tabs(
37
+ [
38
+ "Standard Analysis",
39
+ "Model Comparison",
40
+ "Model Training",
41
+ "Image Analysis",
42
+ "Performance Tracking",
43
+ ]
44
+ )
45
+
46
+ with tab1:
47
+ # Standard single-model analysis
48
+ col1, col2 = st.columns([1, 1.35], gap="small")
49
+ with col1:
50
+ render_input_column()
51
+ with col2:
52
+ render_results_column()
53
+
54
+ with tab2:
55
+ # Multi-model comparison interface
56
+ render_comparison_tab()
57
+
58
+ with tab3:
59
+ # Model training interface
60
+ render_training_tab()
61
+
62
+ with tab4:
63
+ # Image analysis interface
64
+ render_image_upload_interface()
65
+
66
+ with tab5:
67
+ # Performance tracking interface
68
+ render_performance_tab()
69
+
70
+
71
+ if __name__ == "__main__":
72
+ main()