Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from gradio_client import Client
|
| 3 |
-
import
|
| 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 |
-
|
| 29 |
else:
|
| 30 |
-
|
| 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:
|