LogicGoInfotechSpaces commited on
Commit
c98ba13
·
1 Parent(s): fc79b68

Streamlit: initialize UI at module import for HF Spaces

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -139,6 +139,5 @@ def run_streamlit_ui():
139
  "upload then remove the artifacts.")
140
 
141
 
142
- # Only run when executed by Streamlit runner
143
- if getattr(st, "runtime", None) and st.runtime.exists():
144
- run_streamlit_ui()
 
139
  "upload then remove the artifacts.")
140
 
141
 
142
+ # Initialize Streamlit app (HF Spaces runs via `streamlit run app.py`)
143
+ run_streamlit_ui()