Spaces:
Running
on
Zero
Running
on
Zero
Update app_dialogue.py
Browse files- app_dialogue.py +9 -3
app_dialogue.py
CHANGED
|
@@ -324,13 +324,19 @@ with gr.Blocks(fill_height=True, css=".message-wrap.svelte-1lcyrx4>div.svelte-1l
|
|
| 324 |
inputs=decoding_strategy,
|
| 325 |
outputs=top_p,
|
| 326 |
)
|
| 327 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 328 |
gr.ChatInterface(
|
| 329 |
fn=model_inference,
|
| 330 |
chatbot=chatbot,
|
| 331 |
-
|
| 332 |
-
title="Idefics2 Playground",
|
| 333 |
multimodal=True,
|
|
|
|
| 334 |
additional_inputs=[model_selector, decoding_strategy, temperature, max_new_tokens, repetition_penalty, top_p],
|
| 335 |
)
|
| 336 |
|
|
|
|
| 324 |
inputs=decoding_strategy,
|
| 325 |
outputs=top_p,
|
| 326 |
)
|
| 327 |
+
examples = [{"text": "How many items are sold?", "files":["./example_images/docvqa_example.png"]},
|
| 328 |
+
{"text": "What is this UI about?", "files":["./example_images/s2w_example.png"]},
|
| 329 |
+
{"text": "Where is this pastry from?", "files":["./example_images/baklava.png"]},
|
| 330 |
+
{"text": "How much percent is the order status?", "files":["./example_images/dummy_pdf.png"]}]
|
| 331 |
+
|
| 332 |
+
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)."
|
| 333 |
gr.ChatInterface(
|
| 334 |
fn=model_inference,
|
| 335 |
chatbot=chatbot,
|
| 336 |
+
examples=examples,
|
| 337 |
+
title="Idefics2 Playground 💬",
|
| 338 |
multimodal=True,
|
| 339 |
+
description=description,
|
| 340 |
additional_inputs=[model_selector, decoding_strategy, temperature, max_new_tokens, repetition_penalty, top_p],
|
| 341 |
)
|
| 342 |
|