Spaces:
Running
Running
Commit
·
ae66088
1
Parent(s):
7cf92c8
update
Browse files- .gitignore +1 -0
- app.py +3 -1
.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
/.env
|
app.py
CHANGED
|
@@ -160,11 +160,13 @@ def check_model_exists(name):
|
|
| 160 |
huggingface_hub.hf_hub_download(repo_id=name, filename="config.json")
|
| 161 |
return True
|
| 162 |
except (EntryNotFoundError, RepositoryNotFoundError):
|
|
|
|
| 163 |
return False
|
| 164 |
except requests.exceptions.HTTPError:
|
|
|
|
| 165 |
return False
|
| 166 |
except Exception as e:
|
| 167 |
-
print(e)
|
| 168 |
return False
|
| 169 |
|
| 170 |
|
|
|
|
| 160 |
huggingface_hub.hf_hub_download(repo_id=name, filename="config.json")
|
| 161 |
return True
|
| 162 |
except (EntryNotFoundError, RepositoryNotFoundError):
|
| 163 |
+
print(f'Model {name} does not exist Error. 001')
|
| 164 |
return False
|
| 165 |
except requests.exceptions.HTTPError:
|
| 166 |
+
print('Network error while checking model existence. 002')
|
| 167 |
return False
|
| 168 |
except Exception as e:
|
| 169 |
+
print(e, '003')
|
| 170 |
return False
|
| 171 |
|
| 172 |
|