huzey commited on
Commit
94f943d
1 Parent(s): 41699e0

handle gpu quota

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -995,8 +995,12 @@ def run_fn(
995
 
996
  except gr.Error as e:
997
  print(e)
998
- gr.Error(str(e))
999
- gr.Info("Running out of HuggingFace GPU Quota? Try this demo hosted at UPenn.\n\n https://ncut-pytorch.readthedocs.io/en/latest/demo/")
 
 
 
 
1000
 
1001
 
1002
 
 
995
 
996
  except gr.Error as e:
997
  print(e)
998
+ gr.Error(e.message)
999
+ if USE_HUGGINGFACE_ZEROGPU:
1000
+ spaces.zero.gradio.HTMLError(e.message)
1001
+ gr.Error("Error: " + e.message)
1002
+ gr.Error("Error: " + str(e))
1003
+ gr.Info("Running out of HuggingFace GPU Quota? Try this demo hosted at UPenn.</br></br> https://ncut-pytorch.readthedocs.io/en/latest/demo/", duration=20)
1004
 
1005
 
1006