Update app.py
Browse files
app.py
CHANGED
@@ -95,13 +95,6 @@ with gr.Blocks(fill_height=True) as demo:
|
|
95 |
["example_images/s2w_example.png", "What is this UI about?", None, "Greedy", 0.4, 512, 1.2, 0.8],
|
96 |
["example_images/examples_weather_events.png", "Where do the severe droughts happen according to this diagram?", None, "Greedy", 0.4, 512, 1.2, 0.8],
|
97 |
]
|
98 |
-
gr.Examples(
|
99 |
-
examples = examples,
|
100 |
-
inputs=[image_input, query_input, assistant_prefix, decoding_strategy, temperature,
|
101 |
-
max_new_tokens, repetition_penalty, top_p],
|
102 |
-
outputs=output,
|
103 |
-
fn=model_inference, cache_examples=False
|
104 |
-
)
|
105 |
# Hyper-parameters for generation
|
106 |
max_new_tokens = gr.Slider(
|
107 |
minimum=8,
|
@@ -172,7 +165,13 @@ with gr.Blocks(fill_height=True) as demo:
|
|
172 |
inputs=decoding_strategy,
|
173 |
outputs=top_p,
|
174 |
)
|
175 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
|
177 |
|
178 |
submit_btn.click(model_inference, inputs = [image_input, query_input, assistant_prefix, decoding_strategy, temperature,
|
|
|
95 |
["example_images/s2w_example.png", "What is this UI about?", None, "Greedy", 0.4, 512, 1.2, 0.8],
|
96 |
["example_images/examples_weather_events.png", "Where do the severe droughts happen according to this diagram?", None, "Greedy", 0.4, 512, 1.2, 0.8],
|
97 |
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
# Hyper-parameters for generation
|
99 |
max_new_tokens = gr.Slider(
|
100 |
minimum=8,
|
|
|
165 |
inputs=decoding_strategy,
|
166 |
outputs=top_p,
|
167 |
)
|
168 |
+
gr.Examples(
|
169 |
+
examples = examples,
|
170 |
+
inputs=[image_input, query_input, assistant_prefix, decoding_strategy, temperature,
|
171 |
+
max_new_tokens, repetition_penalty, top_p],
|
172 |
+
outputs=output,
|
173 |
+
fn=model_inference, cache_examples=False
|
174 |
+
)
|
175 |
|
176 |
|
177 |
submit_btn.click(model_inference, inputs = [image_input, query_input, assistant_prefix, decoding_strategy, temperature,
|