Spaces:
Running
on
Zero
Running
on
Zero
handle gpu quota
Browse files
app.py
CHANGED
@@ -997,11 +997,11 @@ def run_fn(
|
|
997 |
except gr.Error as e:
|
998 |
# I assume this is a GPU quota error
|
999 |
|
1000 |
-
info1 = 'Running out of HuggingFace GPU Quota
|
1001 |
info2 = 'Or try use the Python package that powers this app: <a style="white-space: nowrap;text-underline-offset: 2px;color: var(--body-text-color)" href="https://ncut-pytorch.readthedocs.io/en/latest/">ncut-pytorch</a>'
|
1002 |
info = info1 + info2
|
1003 |
|
1004 |
-
message = "HuggingFace: " + e.message + "</br></br>---------</br>" + "
|
1005 |
raise gr.Error(message, duration=60)
|
1006 |
|
1007 |
|
|
|
997 |
except gr.Error as e:
|
998 |
# I assume this is a GPU quota error
|
999 |
|
1000 |
+
info1 = 'Running out of HuggingFace GPU Quota?</br> Please try <a style="white-space: nowrap;text-underline-offset: 2px;color: var(--body-text-color)" href="https://ncut-pytorch.readthedocs.io/en/latest/demo/">Demo hosted at UPenn</a></br>'
|
1001 |
info2 = 'Or try use the Python package that powers this app: <a style="white-space: nowrap;text-underline-offset: 2px;color: var(--body-text-color)" href="https://ncut-pytorch.readthedocs.io/en/latest/">ncut-pytorch</a>'
|
1002 |
info = info1 + info2
|
1003 |
|
1004 |
+
message = "<b>HuggingFace: </b></br>" + e.message + "</br></br>---------</br>" + "<b>This Demo Developer: </b></br>" + info
|
1005 |
raise gr.Error(message, duration=60)
|
1006 |
|
1007 |
|