Spaces:
Runtime error
Runtime error
Fix packages.txt build error and add type ignores
Browse files- packages.txt +0 -2
- streamlit_app.py +7 -4
packages.txt
DELETED
|
@@ -1,2 +0,0 @@
|
|
| 1 |
-
# System packages required for the app
|
| 2 |
-
# This file is read by Hugging Face Spaces to install system dependencies
|
|
|
|
|
|
|
|
|
streamlit_app.py
CHANGED
|
@@ -21,15 +21,17 @@ from main import inspect_and_preview, _count_dots_on_preview
|
|
| 21 |
|
| 22 |
# Force configure upload limits using Streamlit's internal config
|
| 23 |
try:
|
| 24 |
-
from streamlit import config
|
|
|
|
| 25 |
config._set_option("server.maxUploadSize", 1024, "command_line")
|
| 26 |
-
config._set_option("server.maxMessageSize", 1024, "command_line")
|
| 27 |
except:
|
| 28 |
pass
|
| 29 |
|
| 30 |
# Also try setting via runtime config
|
| 31 |
try:
|
| 32 |
-
import streamlit.runtime.config as runtime_config
|
|
|
|
| 33 |
runtime_config.get_config_options()["server.maxUploadSize"] = 1024
|
| 34 |
runtime_config.get_config_options()["server.maxMessageSize"] = 1024
|
| 35 |
except:
|
|
@@ -41,7 +43,8 @@ st.title("Cell Detection")
|
|
| 41 |
|
| 42 |
# Display current upload limit for debugging
|
| 43 |
try:
|
| 44 |
-
from streamlit import config
|
|
|
|
| 45 |
current_limit = config.get_option("server.maxUploadSize")
|
| 46 |
st.caption(f"🔧 Current upload limit: {current_limit}MB")
|
| 47 |
except:
|
|
|
|
| 21 |
|
| 22 |
# Force configure upload limits using Streamlit's internal config
|
| 23 |
try:
|
| 24 |
+
from streamlit import config # type: ignore
|
| 25 |
+
|
| 26 |
config._set_option("server.maxUploadSize", 1024, "command_line")
|
| 27 |
+
config._set_option("server.maxMessageSize", 1024, "command_line")
|
| 28 |
except:
|
| 29 |
pass
|
| 30 |
|
| 31 |
# Also try setting via runtime config
|
| 32 |
try:
|
| 33 |
+
import streamlit.runtime.config as runtime_config # type: ignore
|
| 34 |
+
|
| 35 |
runtime_config.get_config_options()["server.maxUploadSize"] = 1024
|
| 36 |
runtime_config.get_config_options()["server.maxMessageSize"] = 1024
|
| 37 |
except:
|
|
|
|
| 43 |
|
| 44 |
# Display current upload limit for debugging
|
| 45 |
try:
|
| 46 |
+
from streamlit import config # type: ignore
|
| 47 |
+
|
| 48 |
current_limit = config.get_option("server.maxUploadSize")
|
| 49 |
st.caption(f"🔧 Current upload limit: {current_limit}MB")
|
| 50 |
except:
|