Spaces:
Runtime error
Runtime error
Update app_dialogue.py
Browse files- app_dialogue.py +7 -6
app_dialogue.py
CHANGED
@@ -596,15 +596,16 @@ with gr.Blocks(title="IDEFICS Playground", theme=gr.themes.Base()) as demo:
|
|
596 |
|
597 |
acc_text += text_token
|
598 |
print(f"acc_text - first - {acc_text}")
|
599 |
-
last_turn = chat_history.pop(-1)
|
600 |
-
print(f"last_turn is - {last_turn}")
|
601 |
-
last_turn[-1] += acc_text
|
602 |
-
print(f"last_turnp[-1] is - {last_turn[-1]}")
|
603 |
-
chat_history.append(last_turn)
|
|
|
604 |
print(f"yields - chat_history -{chat_history} ")
|
605 |
print(f"acc_text -{acc_text} ")
|
606 |
yield "", None, chat_history
|
607 |
-
acc_text = ""
|
608 |
|
609 |
def process_example(message, image):
|
610 |
clear_msg, image_value, chat = model_inference(
|
|
|
596 |
|
597 |
acc_text += text_token
|
598 |
print(f"acc_text - first - {acc_text}")
|
599 |
+
#last_turn = chat_history.pop(-1)
|
600 |
+
#print(f"last_turn is - {last_turn}")
|
601 |
+
#last_turn[-1] += acc_text
|
602 |
+
#print(f"last_turnp[-1] is - {last_turn[-1]}")
|
603 |
+
#chat_history.append(last_turn)
|
604 |
+
chat_history[-1][-1] = acc_text
|
605 |
print(f"yields - chat_history -{chat_history} ")
|
606 |
print(f"acc_text -{acc_text} ")
|
607 |
yield "", None, chat_history
|
608 |
+
#acc_text = ""
|
609 |
|
610 |
def process_example(message, image):
|
611 |
clear_msg, image_value, chat = model_inference(
|