Spaces:
Runtime error
Runtime error
Update app_dialogue.py
Browse files- app_dialogue.py +3 -3
app_dialogue.py
CHANGED
|
@@ -585,7 +585,7 @@ with gr.Blocks(title="IDEFICS Playground", theme=gr.themes.Base()) as demo:
|
|
| 585 |
|
| 586 |
if image is None:
|
| 587 |
# Case where there is no image OR the image is passed as `<fake_token_around_image><image:IMAGE_URL><fake_token_around_image>`
|
| 588 |
-
chat_history.append([prompt_list_to_markdown(user_prompt_list),
|
| 589 |
print(f"image is NONE; Chat_history after append is - {chat_history}")
|
| 590 |
else:
|
| 591 |
# Case where the image is passed through the Image Box.
|
|
@@ -594,8 +594,8 @@ with gr.Blocks(title="IDEFICS Playground", theme=gr.themes.Base()) as demo:
|
|
| 594 |
chat_history.append(
|
| 595 |
[
|
| 596 |
f"{prompt_list_to_markdown([image] + user_prompt_list)}",
|
| 597 |
-
|
| 598 |
-
]
|
| 599 |
)
|
| 600 |
print(f"image is NOT NONE; Chat_history after append is - {chat_history}")
|
| 601 |
|
|
|
|
| 585 |
|
| 586 |
if image is None:
|
| 587 |
# Case where there is no image OR the image is passed as `<fake_token_around_image><image:IMAGE_URL><fake_token_around_image>`
|
| 588 |
+
chat_history.append([prompt_list_to_markdown(user_prompt_list), '']) #ASSISTANT_PREPEND
|
| 589 |
print(f"image is NONE; Chat_history after append is - {chat_history}")
|
| 590 |
else:
|
| 591 |
# Case where the image is passed through the Image Box.
|
|
|
|
| 594 |
chat_history.append(
|
| 595 |
[
|
| 596 |
f"{prompt_list_to_markdown([image] + user_prompt_list)}",
|
| 597 |
+
'',
|
| 598 |
+
] #ASSISTANT_PREPEND
|
| 599 |
)
|
| 600 |
print(f"image is NOT NONE; Chat_history after append is - {chat_history}")
|
| 601 |
|