caokai1073 commited on
Commit
9370b5b
·
verified ·
1 Parent(s): cc905af

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +7 -1
src/streamlit_app.py CHANGED
@@ -19,7 +19,13 @@ uploaded_file = st.file_uploader("Upload CSV or FASTA", type=["csv", "fasta"])
19
  @st.cache_resource
20
  def get_model():
21
  device = "cuda:0" if torch.cuda.is_available() else "cpu"
22
- model, device = load_model("model.pt", device=device)
 
 
 
 
 
 
23
  return model, device
24
 
25
  model, device = get_model()
 
19
  @st.cache_resource
20
  def get_model():
21
  device = "cuda:0" if torch.cuda.is_available() else "cpu"
22
+ from huggingface_hub import hf_hub_download
23
+
24
+ model_path = hf_hub_download(
25
+ repo_id="caokai1073/StriMap",
26
+ filename="src/model.pt",
27
+ )
28
+ model, device = load_model(model_path, device=device)
29
  return model, device
30
 
31
  model, device = get_model()