Update main.py
Browse files
main.py
CHANGED
|
@@ -29,7 +29,7 @@ def generate_image(prompt):
|
|
| 29 |
return image
|
| 30 |
except Exception as e:
|
| 31 |
# Handle the error gracefully, such as logging the error or returning a default image
|
| 32 |
-
|
| 33 |
return "Experiencing high demand. Please retry shortly. Thank you for your patience" # Return None or a default image in case of error
|
| 34 |
|
| 35 |
|
|
|
|
| 29 |
return image
|
| 30 |
except Exception as e:
|
| 31 |
# Handle the error gracefully, such as logging the error or returning a default image
|
| 32 |
+
raise gr.Error(f"Error generating image: {e}")
|
| 33 |
return "Experiencing high demand. Please retry shortly. Thank you for your patience" # Return None or a default image in case of error
|
| 34 |
|
| 35 |
|