warning
Browse files
serve/gradio_web_server.py
CHANGED
|
@@ -116,8 +116,8 @@ def add_text(state, text, image, image_process_mode, request: gr.Request):
|
|
| 116 |
# logger.info(f"add_text. ip: {request.client.host}. len: {len(text)}")
|
| 117 |
print(text, image)
|
| 118 |
if not text or not image:
|
| 119 |
-
|
| 120 |
-
|
| 121 |
|
| 122 |
if len(text) <= 0 and image is None:
|
| 123 |
state.skip_next = True
|
|
|
|
| 116 |
# logger.info(f"add_text. ip: {request.client.host}. len: {len(text)}")
|
| 117 |
print(text, image)
|
| 118 |
if not text or not image:
|
| 119 |
+
gr.Warning("Please provide a prompt and an image.")
|
| 120 |
+
return
|
| 121 |
|
| 122 |
if len(text) <= 0 and image is None:
|
| 123 |
state.skip_next = True
|