GitHub Actions commited on
Commit
220e861
·
1 Parent(s): c060d1b

Sync API from main repo

Browse files
Files changed (1) hide show
  1. fast.py +2 -2
fast.py CHANGED
@@ -39,8 +39,8 @@ async def predict(model_name: str, filepath_csv: UploadFile = File(...)):
39
  if model_name not in model_cache:
40
  try:
41
  if not model_path.exists():
42
- model_path = hf_hub_download(repo_id=model_name, filename=f"{model_name}")
43
- encoder_path = hf_hub_download(repo_id=model_name, filename=f"{encoder_name}")
44
  model_cache[model_name] = load_model_by_type(model_path)
45
  encoder_cache[model_name] = encoder_path
46
  except Exception as e:
 
39
  if model_name not in model_cache:
40
  try:
41
  if not model_path.exists():
42
+ model_path = hf_hub_download(repo_id=HF_REPO_ID, filename=f"{model_name}")
43
+ encoder_path = hf_hub_download(repo_id=HF_REPO_ID, filename=f"{encoder_name}")
44
  model_cache[model_name] = load_model_by_type(model_path)
45
  encoder_cache[model_name] = encoder_path
46
  except Exception as e: