Spaces:
Runtime error
Runtime error
Update app_dialogue.py
Browse files- app_dialogue.py +4 -8
app_dialogue.py
CHANGED
@@ -548,8 +548,7 @@ with gr.Blocks(title="IDEFICS Playground", theme=gr.themes.Base()) as demo:
|
|
548 |
acc_text = ""
|
549 |
|
550 |
def process_example(message, image):
|
551 |
-
clear_msg, image_value, chat =
|
552 |
-
(
|
553 |
model_selector="HuggingFaceM4/idefics-80b-instruct",
|
554 |
user_prompt_str=message,
|
555 |
chat_history=[],
|
@@ -563,8 +562,7 @@ with gr.Blocks(title="IDEFICS Playground", theme=gr.themes.Base()) as demo:
|
|
563 |
return clear_msg, image_value, chat
|
564 |
|
565 |
textbox.submit(
|
566 |
-
fn=
|
567 |
-
,
|
568 |
inputs=[
|
569 |
model_selector,
|
570 |
textbox,
|
@@ -579,8 +577,7 @@ with gr.Blocks(title="IDEFICS Playground", theme=gr.themes.Base()) as demo:
|
|
579 |
outputs=[textbox, imagebox, chatbot],
|
580 |
)
|
581 |
submit_btn.click(
|
582 |
-
fn=
|
583 |
-
,
|
584 |
inputs=[
|
585 |
model_selector,
|
586 |
textbox,
|
@@ -609,8 +606,7 @@ with gr.Blocks(title="IDEFICS Playground", theme=gr.themes.Base()) as demo:
|
|
609 |
return chat_update, text_update
|
610 |
|
611 |
regenerate_btn.click(fn=remove_last_turn, inputs=chatbot, outputs=[chatbot, textbox]).then(
|
612 |
-
fn=
|
613 |
-
,
|
614 |
inputs=[
|
615 |
model_selector,
|
616 |
textbox,
|
|
|
548 |
acc_text = ""
|
549 |
|
550 |
def process_example(message, image):
|
551 |
+
clear_msg, image_value, chat = model_inference(
|
|
|
552 |
model_selector="HuggingFaceM4/idefics-80b-instruct",
|
553 |
user_prompt_str=message,
|
554 |
chat_history=[],
|
|
|
562 |
return clear_msg, image_value, chat
|
563 |
|
564 |
textbox.submit(
|
565 |
+
fn=model_inference,
|
|
|
566 |
inputs=[
|
567 |
model_selector,
|
568 |
textbox,
|
|
|
577 |
outputs=[textbox, imagebox, chatbot],
|
578 |
)
|
579 |
submit_btn.click(
|
580 |
+
fn=model_inference,
|
|
|
581 |
inputs=[
|
582 |
model_selector,
|
583 |
textbox,
|
|
|
606 |
return chat_update, text_update
|
607 |
|
608 |
regenerate_btn.click(fn=remove_last_turn, inputs=chatbot, outputs=[chatbot, textbox]).then(
|
609 |
+
fn=model_inference,
|
|
|
610 |
inputs=[
|
611 |
model_selector,
|
612 |
textbox,
|