ffreemt
commited on
Commit
·
bd3b1f7
1
Parent(s):
ec833bc
Add raise gr.Error
Browse files
app.py
CHANGED
|
@@ -28,8 +28,9 @@ logger.debug("Start dl")
|
|
| 28 |
try:
|
| 29 |
model_path = hf_hub_download(repo_id=repo_id, filename=filename, revision="main")
|
| 30 |
except Exception as exc:
|
| 31 |
-
logger.error(exc)
|
| 32 |
-
raise
|
|
|
|
| 33 |
logger.debug("Done dl")
|
| 34 |
|
| 35 |
# Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
|
|
|
|
| 28 |
try:
|
| 29 |
model_path = hf_hub_download(repo_id=repo_id, filename=filename, revision="main")
|
| 30 |
except Exception as exc:
|
| 31 |
+
logger.error(f"failed to download {filename}: {exc}")
|
| 32 |
+
raise gr.Error("hf acting up, can't donwload the model, exiting")
|
| 33 |
+
# raise SystemExit("hf acting up, can't donwload the model, exiting")
|
| 34 |
logger.debug("Done dl")
|
| 35 |
|
| 36 |
# Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
|