Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -98,9 +98,9 @@ chat_input = gr.MultimodalTextbox(
|
|
98 |
|
99 |
)
|
100 |
EXAMPLES = [
|
101 |
-
{"text": "What is on the desk?", "files": ["./laptop.jpg"]},
|
102 |
-
{"text": "Where it is?", "files": ["./hotel.jpg"]},
|
103 |
-
{"text": "Can yo describe this image?", "files": ["./spacecat.png"]}
|
104 |
]
|
105 |
|
106 |
with gr.Blocks(css=CSS) as demo:
|
@@ -110,11 +110,10 @@ with gr.Blocks(css=CSS) as demo:
|
|
110 |
gr.ChatInterface(
|
111 |
fn=stream_chat,
|
112 |
multimodal=True,
|
113 |
-
examples=EXAMPLES,
|
114 |
textbox=chat_input,
|
115 |
chatbot=chatbot,
|
116 |
fill_height=True,
|
117 |
-
|
118 |
additional_inputs=[
|
119 |
gr.Slider(
|
120 |
minimum=0,
|
@@ -133,7 +132,8 @@ with gr.Blocks(css=CSS) as demo:
|
|
133 |
render=False,
|
134 |
),
|
135 |
],
|
136 |
-
)
|
|
|
137 |
|
138 |
|
139 |
if __name__ == "__main__":
|
|
|
98 |
|
99 |
)
|
100 |
EXAMPLES = [
|
101 |
+
[{"text": "What is on the desk?", "files": ["./laptop.jpg"]}],
|
102 |
+
[{"text": "Where it is?", "files": ["./hotel.jpg"]}],
|
103 |
+
[{"text": "Can yo describe this image?", "files": ["./spacecat.png"]}]
|
104 |
]
|
105 |
|
106 |
with gr.Blocks(css=CSS) as demo:
|
|
|
110 |
gr.ChatInterface(
|
111 |
fn=stream_chat,
|
112 |
multimodal=True,
|
|
|
113 |
textbox=chat_input,
|
114 |
chatbot=chatbot,
|
115 |
fill_height=True,
|
116 |
+
additional_inputs_accordion=gr.Accordion(label="⚙️ Parameters", open=False, render=False),
|
117 |
additional_inputs=[
|
118 |
gr.Slider(
|
119 |
minimum=0,
|
|
|
132 |
render=False,
|
133 |
),
|
134 |
],
|
135 |
+
),
|
136 |
+
gr.Examples(EXAMPLES,[chat_input])
|
137 |
|
138 |
|
139 |
if __name__ == "__main__":
|