Spaces:
Running
on
Zero
Running
on
Zero
Update app_dialogue.py
Browse files- app_dialogue.py +36 -1
app_dialogue.py
CHANGED
@@ -56,6 +56,41 @@ SYSTEM_PROMPT = [
|
|
56 |
],
|
57 |
}
|
58 |
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
|
60 |
API_TOKEN = os.getenv("HF_AUTH_TOKEN")
|
61 |
HF_WRITE_TOKEN = os.getenv("HF_WRITE_TOKEN")
|
@@ -454,7 +489,7 @@ with gr.Blocks(
|
|
454 |
gr.ChatInterface(
|
455 |
fn=model_inference,
|
456 |
chatbot=chatbot,
|
457 |
-
|
458 |
title="Idefics2 Playground",
|
459 |
multimodal=True,
|
460 |
additional_inputs=[
|
|
|
56 |
],
|
57 |
}
|
58 |
]
|
59 |
+
examples_path = os.path.dirname(__file__)
|
60 |
+
EXAMPLES = [
|
61 |
+
[
|
62 |
+
{
|
63 |
+
"text": "Describe the image",
|
64 |
+
"files": [f"{examples_path}/example_images/plant_bulb.webp"],
|
65 |
+
}
|
66 |
+
],
|
67 |
+
[
|
68 |
+
{
|
69 |
+
"text": "Describe the image",
|
70 |
+
"files": [f"{examples_path}/example_images/pope_doudoune.webp"],
|
71 |
+
}
|
72 |
+
],
|
73 |
+
[
|
74 |
+
{
|
75 |
+
"text": "Describe the image",
|
76 |
+
"files": [
|
77 |
+
f"{examples_path}/example_images/kittens-cats-pet-cute-preview.jpg"
|
78 |
+
],
|
79 |
+
}
|
80 |
+
],
|
81 |
+
[
|
82 |
+
{
|
83 |
+
"text": "Describe the image",
|
84 |
+
"files": [f"{examples_path}/example_images/baguettes_guarding_paris.png"],
|
85 |
+
}
|
86 |
+
],
|
87 |
+
[
|
88 |
+
{
|
89 |
+
"text": "Describe the image",
|
90 |
+
"files": [f"{examples_path}/example_images/dragons_playing.png"],
|
91 |
+
}
|
92 |
+
],
|
93 |
+
]
|
94 |
|
95 |
API_TOKEN = os.getenv("HF_AUTH_TOKEN")
|
96 |
HF_WRITE_TOKEN = os.getenv("HF_WRITE_TOKEN")
|
|
|
489 |
gr.ChatInterface(
|
490 |
fn=model_inference,
|
491 |
chatbot=chatbot,
|
492 |
+
examples=EXAMPLES,
|
493 |
title="Idefics2 Playground",
|
494 |
multimodal=True,
|
495 |
additional_inputs=[
|