add validation
Browse files
serve/gradio_web_server.py
CHANGED
@@ -117,7 +117,7 @@ def add_text(state, text, image, image_process_mode, request: gr.Request):
|
|
117 |
print(text, image)
|
118 |
if not text or not image:
|
119 |
print("text empty")
|
120 |
-
raise gr.Warning("Please provide a prompt and an image.")
|
121 |
|
122 |
if len(text) <= 0 and image is None:
|
123 |
state.skip_next = True
|
|
|
117 |
print(text, image)
|
118 |
if not text or not image:
|
119 |
print("text empty")
|
120 |
+
raise gr.Warning("Please provide both a prompt and an image.")
|
121 |
|
122 |
if len(text) <= 0 and image is None:
|
123 |
state.skip_next = True
|