Spaces:
Runtime error
Runtime error
Downgrade streamlit for compatibility with huggingface
Browse files- app.py +1 -1
- requirements.txt +1 -1
app.py
CHANGED
|
@@ -30,7 +30,7 @@ image = None
|
|
| 30 |
###################################
|
| 31 |
# Functions.
|
| 32 |
###################################
|
| 33 |
-
|
| 34 |
def load_model(model_path: str, device: torch.device) -> BasePredictor:
|
| 35 |
model = utils.load_is_model(model_path, device, cpu_dist_maps=True)
|
| 36 |
predictor_params = {"brs_mode": "NoBRS"}
|
|
|
|
| 30 |
###################################
|
| 31 |
# Functions.
|
| 32 |
###################################
|
| 33 |
+
@st.cache(allow_output_mutation=True)
|
| 34 |
def load_model(model_path: str, device: torch.device) -> BasePredictor:
|
| 35 |
model = utils.load_is_model(model_path, device, cpu_dist_maps=True)
|
| 36 |
predictor_params = {"brs_mode": "NoBRS"}
|
requirements.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
streamlit
|
| 2 |
streamlit-drawable-canvas == 0.9.0
|
| 3 |
opencv-python == 4.7.0.72
|
| 4 |
torch == 2.0.0
|
|
|
|
| 1 |
+
streamlit < 1.18.0
|
| 2 |
streamlit-drawable-canvas == 0.9.0
|
| 3 |
opencv-python == 4.7.0.72
|
| 4 |
torch == 2.0.0
|