Update app.py
Browse files
app.py
CHANGED
@@ -316,8 +316,6 @@ def bot(history, temperature, top_p, max_output_tokens):
|
|
316 |
# images_this_term.append(message[0][0])
|
317 |
|
318 |
|
319 |
-
|
320 |
-
|
321 |
assert len(images_this_term) > 0, "must have an image"
|
322 |
# image_files = (args.image_file).split(',')
|
323 |
# image = [load_image(f) for f in images_this_term if f]
|
@@ -550,11 +548,10 @@ with gr.Blocks(
|
|
550 |
gr.Markdown(learn_more_markdown)
|
551 |
gr.Markdown(bibtext)
|
552 |
|
553 |
-
chat_msg =
|
|
|
554 |
add_message, [chatbot, chat_input], [chatbot, chat_input]
|
555 |
-
)
|
556 |
-
bot_msg = chat_msg.then(bot, [chatbot,temperature, top_p, max_output_tokens], chatbot, api_name="bot_response")
|
557 |
-
bot_msg.then(lambda: gr.MultimodalTextbox(interactive=True), None, [chat_input])
|
558 |
|
559 |
# chatbot.like(print_like_dislike, None, None)
|
560 |
clear_btn.click(
|
|
|
316 |
# images_this_term.append(message[0][0])
|
317 |
|
318 |
|
|
|
|
|
319 |
assert len(images_this_term) > 0, "must have an image"
|
320 |
# image_files = (args.image_file).split(',')
|
321 |
# image = [load_image(f) for f in images_this_term if f]
|
|
|
548 |
gr.Markdown(learn_more_markdown)
|
549 |
gr.Markdown(bibtext)
|
550 |
|
551 |
+
# chat_msg =
|
552 |
+
chat_input.submit(
|
553 |
add_message, [chatbot, chat_input], [chatbot, chat_input]
|
554 |
+
).then(bot, [chatbot,temperature, top_p, max_output_tokens], chatbot, api_name="bot_response").then(lambda: gr.MultimodalTextbox(interactive=True), None, [chat_input])
|
|
|
|
|
555 |
|
556 |
# chatbot.like(print_like_dislike, None, None)
|
557 |
clear_btn.click(
|