Spaces:
Runtime error
Runtime error
Update app_dialogue.py (#1)
Browse files- Update app_dialogue.py (4817a04e67ea31ab087fb23e8a388989fc025893)
- use list of list for examples (1b6dfcc92ef2b7ccfac0decb5db078e690cfdf2d)
Co-authored-by: Merve Noyan <merve@users.noreply.huggingface.co>
- app_dialogue.py +13 -3
app_dialogue.py
CHANGED
@@ -322,13 +322,23 @@ with gr.Blocks(fill_height=True, css=".message-wrap.svelte-1lcyrx4>div.svelte-1l
|
|
322 |
inputs=decoding_strategy,
|
323 |
outputs=top_p,
|
324 |
)
|
325 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
326 |
gr.ChatInterface(
|
327 |
fn=model_inference,
|
328 |
chatbot=chatbot,
|
329 |
-
|
330 |
-
title="Idefics2 Playground",
|
331 |
multimodal=True,
|
|
|
332 |
additional_inputs=[model_selector, decoding_strategy, temperature, max_new_tokens, repetition_penalty, top_p],
|
333 |
)
|
334 |
|
|
|
322 |
inputs=decoding_strategy,
|
323 |
outputs=top_p,
|
324 |
)
|
325 |
+
examples =[
|
326 |
+
["./example_images/docvqa_example.png", "How many items are sold?", "Greedy", 0.4, 512, 1.2, 0.8],
|
327 |
+
["./example_images/example_images_travel_tips.jpg", "I want to go somewhere similar to the one in the photo. Give me destinations and travel tips.", "Greedy", 0.4, 512, 1.2, 0.8],
|
328 |
+
["./example_images/baklava.png", "Where is this pastry from?", "Greedy", 0.4, 512, 1.2, 0.8],
|
329 |
+
["./example_images/dummy_pdf.png", "How much percent is the order status?", "Greedy", 0.4, 512, 1.2, 0.8],
|
330 |
+
["./example_images/art_critic.png", "As an art critic AI assistant, could you describe this painting in details and make a thorough critic?.", "Greedy", 0.4, 512, 1.2, 0.8],
|
331 |
+
["./example_images/s2w_example.png", "What is this UI about?", "Greedy", 0.4, 512, 1.2, 0.8]
|
332 |
+
]
|
333 |
+
|
334 |
+
description = "Try [IDEFICS2-8B](https://huggingface.co/HuggingFaceM4/idefics2-8b), the instruction fine-tuned IDEFICS2, and [IDEFICS2 Chatty](CHATTY_LINK_HERE) in this demo. 🐶💬 IDEFICS2 is a state-of-the-art vision language model in various benchmarks. To get started, upload an image and write a text prompt or try one of the examples. You can also play with advanced generation parameters. To learn more about IDEFICS2, read [the blog](https://huggingface.co/blog/idefics2)."
|
335 |
gr.ChatInterface(
|
336 |
fn=model_inference,
|
337 |
chatbot=chatbot,
|
338 |
+
examples=examples,
|
339 |
+
title="Idefics2 Playground 💬",
|
340 |
multimodal=True,
|
341 |
+
description=description,
|
342 |
additional_inputs=[model_selector, decoding_strategy, temperature, max_new_tokens, repetition_penalty, top_p],
|
343 |
)
|
344 |
|