Spaces:
Runtime error
Runtime error
Commit
·
db08793
1
Parent(s):
49f145b
Update app.py
Browse files
app.py
CHANGED
|
@@ -39,7 +39,9 @@ def run_lora(prompt, selected_state, progress=gr.Progress(track_tqdm=True)):
|
|
| 39 |
if response.status_code == 200:
|
| 40 |
return Image.open(io.BytesIO(response.content))
|
| 41 |
else:
|
| 42 |
-
|
|
|
|
|
|
|
| 43 |
|
| 44 |
with gr.Blocks(css="custom.css") as app:
|
| 45 |
title = gr.HTML("<h1>LoRA the Explorer</h1>")
|
|
|
|
| 39 |
if response.status_code == 200:
|
| 40 |
return Image.open(io.BytesIO(response.content))
|
| 41 |
else:
|
| 42 |
+
logging.error(f"API Error: {response.status_code}")
|
| 43 |
+
raise gr.Error("API Error: Unable to fetch the image.") # Raise a Gradio error here
|
| 44 |
+
|
| 45 |
|
| 46 |
with gr.Blocks(css="custom.css") as app:
|
| 47 |
title = gr.HTML("<h1>LoRA the Explorer</h1>")
|