huzey commited on
Commit
345e38b
1 Parent(s): 5ff5029

handle gpu quota

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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? 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 = "HuggingFace: " + e.message + "</br></br>---------</br>" + "Developers: " + info
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