Spaces:
Sleeping
Sleeping
Delete src/streamlit_app.py
Browse files- src/streamlit_app.py +0 -18
src/streamlit_app.py
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
import os, types, streamlit as st
|
2 |
-
|
3 |
-
# Fetch the hidden code from env var
|
4 |
-
app_code = os.environ.get("APP_CODE", "")
|
5 |
-
|
6 |
-
def execute_code(code_str):
|
7 |
-
module = types.ModuleType("dynamic_app")
|
8 |
-
try:
|
9 |
-
exec(code_str, module.__dict__)
|
10 |
-
if hasattr(module, "main"):
|
11 |
-
module.main()
|
12 |
-
except Exception as e:
|
13 |
-
st.error(f"Error in hidden code: {e}")
|
14 |
-
|
15 |
-
if app_code:
|
16 |
-
execute_code(app_code)
|
17 |
-
else:
|
18 |
-
st.error("APP_CODE is empty. Did you set it?")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|