Spaces:
Running
on
Zero
Running
on
Zero
VictorSanh
commited on
Commit
•
91e4b1d
1
Parent(s):
adf07d5
updates
Browse files- app_dialogue.py +10 -1
app_dialogue.py
CHANGED
@@ -366,7 +366,15 @@ top_p = gr.Slider(
|
|
366 |
info="Higher values is equivalent to sampling more low-probability tokens.",
|
367 |
)
|
368 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
369 |
with gr.Blocks(fill_height=True) as demo:
|
|
|
370 |
with gr.Row(elem_id="model_selector_row"):
|
371 |
model_selector = gr.Dropdown(
|
372 |
choices=MODELS.keys(),
|
@@ -395,8 +403,9 @@ with gr.Blocks(fill_height=True) as demo:
|
|
395 |
|
396 |
gr.ChatInterface(
|
397 |
fn=model_inference,
|
|
|
398 |
# examples=[{"text": "hello"}, {"text": "hola"}, {"text": "merhaba"}],
|
399 |
-
title="
|
400 |
multimodal=True,
|
401 |
additional_inputs=[model_selector, decoding_strategy, temperature, max_new_tokens, repetition_penalty, top_p],
|
402 |
)
|
|
|
366 |
info="Higher values is equivalent to sampling more low-probability tokens.",
|
367 |
)
|
368 |
|
369 |
+
|
370 |
+
chatbot = gr.Chatbot(
|
371 |
+
label="IDEFICS2",
|
372 |
+
avatar_images=[None, BOT_AVATAR],
|
373 |
+
)
|
374 |
+
|
375 |
+
|
376 |
with gr.Blocks(fill_height=True) as demo:
|
377 |
+
# model selector should be set to `visbile=False` ultimately
|
378 |
with gr.Row(elem_id="model_selector_row"):
|
379 |
model_selector = gr.Dropdown(
|
380 |
choices=MODELS.keys(),
|
|
|
403 |
|
404 |
gr.ChatInterface(
|
405 |
fn=model_inference,
|
406 |
+
chatbot=chatbot,
|
407 |
# examples=[{"text": "hello"}, {"text": "hola"}, {"text": "merhaba"}],
|
408 |
+
title="Idefics2 Playground",
|
409 |
multimodal=True,
|
410 |
additional_inputs=[model_selector, decoding_strategy, temperature, max_new_tokens, repetition_penalty, top_p],
|
411 |
)
|