Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -105,7 +105,7 @@ def upload_imgorvideo(gr_video, gr_img, text_input,chatbot,audio_flag):
|
|
| 105 |
img_list = []
|
| 106 |
llm_message = chat.upload_video(gr_video, chat_state, img_list)
|
| 107 |
print(chat_state.messages)
|
| 108 |
-
return chat_state, chatbot
|
| 109 |
elif gr_img is not None:
|
| 110 |
print(gr_img)
|
| 111 |
chatbot = [((gr_img,), None)]
|
|
@@ -225,7 +225,7 @@ with gr.Blocks() as demo:
|
|
| 225 |
text_input.submit(upload_imgorvideo, inputs=[video, image, text_input], outputs=[text_input,chatbot, chat_state]).then(
|
| 226 |
gradio_ask, [text_input, chatbot, chat_state], [text_input, chatbot, chat_state]).then(gradio_answer, [chatbot, chat_state, img_list, num_beams, temperature], [chatbot, chat_state, img_list]
|
| 227 |
)
|
| 228 |
-
clear.click(gradio_reset, [chat_state, img_list], [chatbot, video, image, text_input, upload_button, chat_state, img_list], queue=False)
|
| 229 |
|
| 230 |
demo.queue().launch(debug=True)
|
| 231 |
|
|
|
|
| 105 |
img_list = []
|
| 106 |
llm_message = chat.upload_video(gr_video, chat_state, img_list)
|
| 107 |
print(chat_state.messages)
|
| 108 |
+
return text_input,chat_state, chatbot
|
| 109 |
elif gr_img is not None:
|
| 110 |
print(gr_img)
|
| 111 |
chatbot = [((gr_img,), None)]
|
|
|
|
| 225 |
text_input.submit(upload_imgorvideo, inputs=[video, image, text_input], outputs=[text_input,chatbot, chat_state]).then(
|
| 226 |
gradio_ask, [text_input, chatbot, chat_state], [text_input, chatbot, chat_state]).then(gradio_answer, [chatbot, chat_state, img_list, num_beams, temperature], [chatbot, chat_state, img_list]
|
| 227 |
)
|
| 228 |
+
#clear.click(gradio_reset, [chat_state, img_list], [chatbot, video, image, text_input, upload_button, chat_state, img_list], queue=False)
|
| 229 |
|
| 230 |
demo.queue().launch(debug=True)
|
| 231 |
|