curt-park commited on
Commit
a74cdb0
·
1 Parent(s): 5fd2412

Downgrade streamlit for compatibility with huggingface

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. requirements.txt +1 -1
app.py CHANGED
@@ -30,7 +30,7 @@ image = None
30
  ###################################
31
  # Functions.
32
  ###################################
33
- # @st.cache_resource # TODO: this doesn't work on Huggingface!
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 == 1.20.0
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