KaiChen1998 commited on
Commit
885de3a
·
1 Parent(s): 996d4eb
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -109,7 +109,7 @@ def add_text(state, text, image, image_process_mode):
109
  logging.info(f"add_text. len: {len(text)}")
110
  if len(text) <= 0 or image is None:
111
  state.skip_next = True
112
- return (state, state.to_gradio_chatbot_public(), "") + (no_change_btn,) * 2
113
 
114
  # Deal with image inputs
115
  if image is not None:
@@ -120,7 +120,7 @@ def add_text(state, text, image, image_process_mode):
120
  state.append_message(state.roles[0], text)
121
  state.skip_next = False
122
  logging.info(str(state.messages))
123
- return (state, state.to_gradio_chatbot_public(), "") + (disable_btn,) * 2
124
 
125
  ############
126
  # Get response
 
109
  logging.info(f"add_text. len: {len(text)}")
110
  if len(text) <= 0 or image is None:
111
  state.skip_next = True
112
+ return (state, state.to_gradio_chatbot_public(), "", None) + (no_change_btn,) * 2
113
 
114
  # Deal with image inputs
115
  if image is not None:
 
120
  state.append_message(state.roles[0], text)
121
  state.skip_next = False
122
  logging.info(str(state.messages))
123
+ return (state, state.to_gradio_chatbot_public(), "", None) + (disable_btn,) * 2
124
 
125
  ############
126
  # Get response