comidan commited on
Commit
bf8bc21
1 Parent(s): d146afb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -82,7 +82,7 @@ def gradio_reset(chat_state, img_list):
82
  img_list = []
83
  return None, gr.update(value=None, interactive=True), gr.update(value=None, interactive=True), gr.update(placeholder='Please upload your video first', interactive=False),gr.update(value="Upload & Start Chat", interactive=True), chat_state, img_list
84
 
85
- def upload_imgorvideo(gr_video, gr_img, text_input, chat_state,chatbot,audio_flag):
86
  if args.model_type == 'vicuna':
87
  chat_state = default_conversation.copy()
88
  else:
@@ -219,7 +219,7 @@ with gr.Blocks() as demo:
219
 
220
 
221
  gr.Markdown(cite_markdown)
222
- upload_button.click(upload_imgorvideo, [video, image, text_input, chat_state,chatbot,audio], [video, image, text_input, upload_button, chat_state, img_list,chatbot])
223
 
224
  text_input.submit(gradio_ask, [text_input, chatbot, chat_state], [text_input, chatbot, chat_state]).then(
225
  gradio_answer, [chatbot, chat_state, img_list, num_beams, temperature], [chatbot, chat_state, img_list]
 
82
  img_list = []
83
  return None, gr.update(value=None, interactive=True), gr.update(value=None, interactive=True), gr.update(placeholder='Please upload your video first', interactive=False),gr.update(value="Upload & Start Chat", interactive=True), chat_state, img_list
84
 
85
+ def upload_imgorvideo(gr_video, gr_img, text_input,chatbot,audio_flag):
86
  if args.model_type == 'vicuna':
87
  chat_state = default_conversation.copy()
88
  else:
 
219
 
220
 
221
  gr.Markdown(cite_markdown)
222
+ upload_button.click(upload_imgorvideo, [video, image, text_input,chatbot], [video, image, text_input, upload_button, chat_state, img_list,chatbot])
223
 
224
  text_input.submit(gradio_ask, [text_input, chatbot, chat_state], [text_input, chatbot, chat_state]).then(
225
  gradio_answer, [chatbot, chat_state, img_list, num_beams, temperature], [chatbot, chat_state, img_list]