Update app.py
Browse files
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.
|
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!"
|