imomayiz commited on
Commit
7b27b9c
·
verified ·
1 Parent(s): d2e459f

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +2 -1
src/streamlit_app.py CHANGED
@@ -57,8 +57,9 @@ def predict_with_fasttext(model, texts: list[str]) -> list[str]:
57
  return y_hat
58
 
59
  def load_hf_fasttext_model(model_id):
60
- model_path = hf_hub_download(repo_id=model_id, filename="model.bin", cache_dir=None)
61
  model = fasttext.load_model(model_path)
 
62
  return model
63
 
64
  def load_local_fasttext_model(model_path):
 
57
  return y_hat
58
 
59
  def load_hf_fasttext_model(model_id):
60
+ model_path = hf_hub_download(repo_id=model_id, filename="model.bin", cache_dir=CACHE_DIR)
61
  model = fasttext.load_model(model_path)
62
+ os.remove(model_path)
63
  return model
64
 
65
  def load_local_fasttext_model(model_path):