Spaces:
Runtime error
Runtime error
Commit
·
e26a679
1
Parent(s):
aae856c
bringing back to normal
Browse files- app_dialogue.py +28 -28
app_dialogue.py
CHANGED
@@ -347,40 +347,40 @@ with gr.Blocks(title="IDEFICS Playground", theme=gr.themes.Base()) as demo:
|
|
347 |
|
348 |
imagebox = gr.Image(type="filepath", label="Image input", visible=False)
|
349 |
|
350 |
-
|
351 |
# def prefetch_images_in_history(user_prompt_str):
|
352 |
# """
|
353 |
# Pre-fetch the images that are passed in the chatbot default history.
|
354 |
# """
|
355 |
# return prompt_list_to_markdown(handle_manual_images_in_user_prompt(user_prompt_str))
|
356 |
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
|
385 |
with gr.Group():
|
386 |
with gr.Row():
|
|
|
347 |
|
348 |
imagebox = gr.Image(type="filepath", label="Image input", visible=False)
|
349 |
|
350 |
+
with gr.Row():
|
351 |
# def prefetch_images_in_history(user_prompt_str):
|
352 |
# """
|
353 |
# Pre-fetch the images that are passed in the chatbot default history.
|
354 |
# """
|
355 |
# return prompt_list_to_markdown(handle_manual_images_in_user_prompt(user_prompt_str))
|
356 |
|
357 |
+
chatbot = gr.Chatbot(
|
358 |
+
elem_id="chatbot",
|
359 |
+
label="IDEFICS",
|
360 |
+
visible=True,
|
361 |
+
height=750,
|
362 |
+
# value=[
|
363 |
+
# [
|
364 |
+
# (
|
365 |
+
# prefetch_images_in_history(
|
366 |
+
# """Write a funny story including the following characters.
|
367 |
+
# There should be drama and most importantly romance.
|
368 |
+
# Character 1:<fake_token_around_image><image:https://m.media-amazon.com/images/M/MV5BODg1OTczMWEtNTU3MS00OTUzLThjODEtNDg1MWQwZmExYmFlXkEyXkFqcGdeQWFybm8@._V1_QL75_UX500_CR0,0,500,281_.jpg><fake_token_around_image>
|
369 |
+
# Character 2:<fake_token_around_image><image:https://static.wikia.nocookie.net/dreamworks/images/0/09/Shrek_dreamworks.png/revision/latest?cb=20170921225439><fake_token_around_image>
|
370 |
+
# Character 3:<fake_token_around_image><image:https://upload.wikimedia.org/wikipedia/en/e/ef/Marsupilami_1.jpg><fake_token_around_image>
|
371 |
+
# The plot should take place in the world pictured here:<fake_token_around_image><image:https://www.astronomy.com/wp-content/uploads/sites/2/2021/09/ON1.jpg><fake_token_around_image>"""
|
372 |
+
# )
|
373 |
+
# ),
|
374 |
+
# """Once upon a time, in a world where the sky was a dome and the ground was covered in grass, there lived a beautiful princess named Mulan. She was kind, brave, and always ready to help others. One day, while walking through the forest, she stumbled upon a strange creature. It was a green ogre named Shrek, who was lost and looking for his way back home.
|
375 |
+
# Mulan, being the kind-hearted person she was, decided to help Shrek find his way back. As they traveled together, they began to develop a strong bond. Shrek was impressed by Mulan's bravery and determination, while Mulan admired Shrek's loyalty and sense of humor.
|
376 |
+
# However, their journey was not without obstacles. They encountered a mischievous cat named Hoboua, who was always causing trouble and getting into fights. Despite his troublemaking ways, Hoboua had a good heart and eventually became a valuable ally to Mulan and Shrek.
|
377 |
+
# As they traveled, they faced many challenges, including battling fierce dragons and navigating treacherous mountains. Through it all, Mulan and Shrek grew closer, and their feelings for each other deepened.
|
378 |
+
# Finally, they reached Shrek's home, and he was reunited with his family and friends. Mulan, however, was sad to leave him behind. But Shrek had a surprise for her. He had fallen in love with her and wanted to be with her forever.
|
379 |
+
# Mulan was overjoyed, and they shared a passionate kiss. From that day on, they lived happily ever after, exploring the world together and facing any challenges that came their way.
|
380 |
+
# And so, the story of Mulan and Shrek's romance came to an end, leaving a lasting impression on all who heard it.""",
|
381 |
+
# ],
|
382 |
+
# ],
|
383 |
+
)
|
384 |
|
385 |
with gr.Group():
|
386 |
with gr.Row():
|