mattb512 commited on
Commit
48899bd
1 Parent(s): a1091d4

add validation

Browse files
Files changed (1) hide show
  1. serve/gradio_web_server.py +4 -4
serve/gradio_web_server.py CHANGED
@@ -114,11 +114,11 @@ def clear_history(request: gr.Request):
114
 
115
  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
- if not text:
118
- raise gr.Error("Please provide a prompt.")
119
 
120
- if not image:
121
- raise gr.Error("Please provide an image.")
122
 
123
  if len(text) <= 0 and image is None:
124
  state.skip_next = True
 
114
 
115
  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
+ # if not text:
118
+ # raise gr.Error("Please provide a prompt.")
119
 
120
+ # if not image:
121
+ # raise gr.Error("Please provide an image.")
122
 
123
  if len(text) <= 0 and image is None:
124
  state.skip_next = True