Rooni commited on
Commit
af96747
1 Parent(s): db0e646

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import gradio as gr
2
  from gradio_client import Client
3
- import uuid
4
 
5
  MORE = """ ## TRY Other Models
6
  ### JARVIS: Your VOICE Assistant -> https://huggingface.co/spaces/KingNish/JARVIS
@@ -25,9 +25,9 @@ def generate_image(prompt, base="Realistic", motion="", step=8, progress=gr.Prog
25
  except ValueError as e:
26
  # Handle GPU quota exceeded error
27
  if 'You have exceeded your GPU quota' in str(e):
28
- return "Error: GPU quota exceeded. Please retry later."
29
  else:
30
- return f"Error: {str(e)}"
31
 
32
  # Gradio Interface
33
  with gr.Blocks(css="style.css") as demo:
 
1
  import gradio as gr
2
  from gradio_client import Client
3
+ import os
4
 
5
  MORE = """ ## TRY Other Models
6
  ### JARVIS: Your VOICE Assistant -> https://huggingface.co/spaces/KingNish/JARVIS
 
25
  except ValueError as e:
26
  # Handle GPU quota exceeded error
27
  if 'You have exceeded your GPU quota' in str(e):
28
+ raise gr.Error("GPU Quota exceeded. Please try again later.")
29
  else:
30
+ raise gr.Error(str(e))
31
 
32
  # Gradio Interface
33
  with gr.Blocks(css="style.css") as demo: