Spaces:
Paused
Paused
Update app.py
Browse files
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,
|
| 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,
|
| 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]
|