Spaces:
Running
Running
Sebastiankay
commited on
Commit
•
a1f0ffd
1
Parent(s):
d2c9fd2
Update app.py
Browse files
app.py
CHANGED
@@ -190,11 +190,12 @@ def process(Prompt, used_model, image_width, image_height, image_ratio, image_se
|
|
190 |
return ({"value": Prompt, "__type__": "update"}, {"value": file_path, "__type__": "update"}, {"value": None, "visible": False, "__type__": "update"}, {"visible": True, "__type__": "update"}, {"value": Prompt, "visible": True, "__type__": "update"}, img_width, img_height, used_seed, {"value": file_path, "visible": True, "__type__": "update"}, img_dominant_color, used_seed)
|
191 |
else:
|
192 |
print("Imagine API Request ERROR")
|
193 |
-
raise gr.Error("Imagine API
|
194 |
except requests.exceptions.Timeout:
|
195 |
-
raise gr.Error("Zeitüberschreitung beim API-Aufruf", duration=15)
|
196 |
except requests.exceptions.RequestException as e:
|
197 |
-
|
|
|
198 |
|
199 |
|
200 |
# MARK: Gradio BLOCKS UI
|
|
|
190 |
return ({"value": Prompt, "__type__": "update"}, {"value": file_path, "__type__": "update"}, {"value": None, "visible": False, "__type__": "update"}, {"visible": True, "__type__": "update"}, {"value": Prompt, "visible": True, "__type__": "update"}, img_width, img_height, used_seed, {"value": file_path, "visible": True, "__type__": "update"}, img_dominant_color, used_seed)
|
191 |
else:
|
192 |
print("Imagine API Request ERROR")
|
193 |
+
raise gr.Error("Imagine API-Aufruf fehlgeschlagen 💥!", duration=15)
|
194 |
except requests.exceptions.Timeout:
|
195 |
+
raise gr.Error("⏰ Zeitüberschreitung beim API-Aufruf", duration=15)
|
196 |
except requests.exceptions.RequestException as e:
|
197 |
+
print(f"Unbekannter Fehler beim API-Aufruf: {e}")
|
198 |
+
raise gr.Error("Unbekannter Fehler beim API-Aufruf! 🤷♂️", duration=15)
|
199 |
|
200 |
|
201 |
# MARK: Gradio BLOCKS UI
|