chendl commited on
Commit
b96f40b
1 Parent(s): 020e358

update chat

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -247,7 +247,7 @@ def gradio_ask(user_message, chatbot, chat_state,radio):
247
  return '', chatbot, chat_state
248
 
249
 
250
- def gradio_answer(chatbot, chat_state, img_list, radio, text,num_beams, temperature,radio):
251
  llm_message,image = \
252
  chat.answer(conv=chat_state, img_list=img_list, max_new_tokens=300, num_beams=1, temperature=temperature,
253
  max_length=2000,radio = radio,text_input = text)
@@ -318,7 +318,7 @@ with gr.Blocks() as demo:
318
  [image, text_input, upload_button, chat_state, img_list,chatbot])
319
 
320
  text_input.submit(gradio_ask, [text_input, chatbot, chat_state,radio], [text_input, chatbot, chat_state]).then(
321
- gradio_answer, [chatbot, chat_state, img_list, radio, text_input,num_beams, temperature, radio], [chatbot, chat_state, img_list]
322
  )
323
  clear.click(gradio_reset, [chat_state, img_list], [chatbot, image, text_input, upload_button, chat_state, img_list],
324
  queue=False)
 
247
  return '', chatbot, chat_state
248
 
249
 
250
+ def gradio_answer(chatbot, chat_state, img_list, radio, text,num_beams, temperature):
251
  llm_message,image = \
252
  chat.answer(conv=chat_state, img_list=img_list, max_new_tokens=300, num_beams=1, temperature=temperature,
253
  max_length=2000,radio = radio,text_input = text)
 
318
  [image, text_input, upload_button, chat_state, img_list,chatbot])
319
 
320
  text_input.submit(gradio_ask, [text_input, chatbot, chat_state,radio], [text_input, chatbot, chat_state]).then(
321
+ gradio_answer, [chatbot, chat_state, img_list, radio, text_input,num_beams, temperature], [chatbot, chat_state, img_list]
322
  )
323
  clear.click(gradio_reset, [chat_state, img_list], [chatbot, image, text_input, upload_button, chat_state, img_list],
324
  queue=False)