Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -131,7 +131,8 @@ def query(prompt, model, is_negative=False, steps=30, cfg_scale=7, sampler="DPM+
|
|
| 131 |
if response.status_code != 200:
|
| 132 |
print(f"Ошибка: Не удалось получить изображение. Статус ответа: {response.status_code}")
|
| 133 |
print(f"Содержимое ответа: {response.text}")
|
| 134 |
-
|
|
|
|
| 135 |
|
| 136 |
try:
|
| 137 |
image_bytes = response.content
|
|
|
|
| 131 |
if response.status_code != 200:
|
| 132 |
print(f"Ошибка: Не удалось получить изображение. Статус ответа: {response.status_code}")
|
| 133 |
print(f"Содержимое ответа: {response.text}")
|
| 134 |
+
raise gr.Error(error=f"{response.status_code}")
|
| 135 |
+
return None
|
| 136 |
|
| 137 |
try:
|
| 138 |
image_bytes = response.content
|