wcy1122 commited on
Commit
506f788
1 Parent(s): c619862

update code

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -231,7 +231,7 @@ def add_text(state, imagebox, textbox, image_process_mode, gen_image):
231
  state.append_message(state.roles[0], textbox)
232
  state.append_message(state.roles[1], None)
233
 
234
- yield (state, state.to_gradio_chatbot(), "", None) + (disable_btn, disable_btn, disable_btn, enable_btn, enable_btn)
235
 
236
 
237
  def delete_text(state, image_process_mode):
@@ -328,7 +328,7 @@ with gr.Blocks(title='Mini-Gemini') as demo:
328
  textbox.submit(
329
  add_text,
330
  [state, imagebox, textbox, image_process_mode, gen_image],
331
- [state, chatbot, textbox, imagebox] + btn_list,
332
  ).then(
333
  generate,
334
  [state, imagebox, textbox, image_process_mode, gen_image, temperature, top_p, max_output_tokens],
@@ -337,7 +337,7 @@ with gr.Blocks(title='Mini-Gemini') as demo:
337
  submit_btn.click(
338
  add_text,
339
  [state, imagebox, textbox, image_process_mode, gen_image],
340
- [state, chatbot, textbox, imagebox] + btn_list,
341
  ).then(
342
  generate,
343
  [state, imagebox, textbox, image_process_mode, gen_image, temperature, top_p, max_output_tokens],
 
231
  state.append_message(state.roles[0], textbox)
232
  state.append_message(state.roles[1], None)
233
 
234
+ yield (state, state.to_gradio_chatbot(), "", None, gen_image) + (disable_btn, disable_btn, disable_btn, enable_btn, enable_btn)
235
 
236
 
237
  def delete_text(state, image_process_mode):
 
328
  textbox.submit(
329
  add_text,
330
  [state, imagebox, textbox, image_process_mode, gen_image],
331
+ [state, chatbot, textbox, imagebox, gen_image] + btn_list,
332
  ).then(
333
  generate,
334
  [state, imagebox, textbox, image_process_mode, gen_image, temperature, top_p, max_output_tokens],
 
337
  submit_btn.click(
338
  add_text,
339
  [state, imagebox, textbox, image_process_mode, gen_image],
340
+ [state, chatbot, textbox, imagebox, gen_image] + btn_list,
341
  ).then(
342
  generate,
343
  [state, imagebox, textbox, image_process_mode, gen_image, temperature, top_p, max_output_tokens],