devingulliver commited on
Commit
8300932
·
verified ·
1 Parent(s): 0fade42

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -8,7 +8,7 @@ webhook_url = os.environ.get("WEBHOOK_URL")
8
  def submit_model(name):
9
  try:
10
  huggingface_hub.hf_hub_download(repo_id=name, filename="config.json") # sanity check input
11
- except huggingface_hub.utils._errors.FileNotFoundError:
12
  return "# ERROR: Model does not have a config.json file!"
13
  except huggingface_hub.utils._errors.RepositoryNotFoundError:
14
  return "# ERROR: Model could not be found on the Hugging Face Hub!"
 
8
  def submit_model(name):
9
  try:
10
  huggingface_hub.hf_hub_download(repo_id=name, filename="config.json") # sanity check input
11
+ except huggingface_hub.utils._errors.EntryNotFoundError:
12
  return "# ERROR: Model does not have a config.json file!"
13
  except huggingface_hub.utils._errors.RepositoryNotFoundError:
14
  return "# ERROR: Model could not be found on the Hugging Face Hub!"