Spaces:
Sleeping
Sleeping
vtrv.vls
commited on
Commit
·
dfbdbad
1
Parent(s):
59904b9
Clear inputs on model change
Browse files
app.py
CHANGED
|
@@ -50,7 +50,6 @@ def clear_component(comp):
|
|
| 50 |
with gradio.Blocks():
|
| 51 |
clear = gradio.ClearButton()
|
| 52 |
|
| 53 |
-
|
| 54 |
MODEL_LIB = {'RUBASE': giga_gen, 'TINYLLAMA': tiny_gen, 'QWEN2INS1B': qwen_gen}
|
| 55 |
|
| 56 |
def tab_arena():
|
|
@@ -58,11 +57,11 @@ def tab_arena():
|
|
| 58 |
with gradio.Column():
|
| 59 |
model_left = gradio.Dropdown(["TINYLLAMA", "QWEN2INS1B", "RUBASE"], value="TINYLLAMA", interactive=True, multiselect=False, label="Left model")
|
| 60 |
chatbot_left = gradio.Chatbot()
|
| 61 |
-
model_left.change(model_gen, [
|
| 62 |
with gradio.Column():
|
| 63 |
model_right = gradio.Dropdown(["TINYLLAMA", "QWEN2INS1B", "RUBASE"], value= "RUBASE", interactive=True, multiselect=False, label="Right model")
|
| 64 |
chatbot_right = gradio.Chatbot()
|
| 65 |
-
model_right.change(model_gen, [
|
| 66 |
|
| 67 |
with gradio.Row():
|
| 68 |
gradio.Button('Both Good')
|
|
|
|
| 50 |
with gradio.Blocks():
|
| 51 |
clear = gradio.ClearButton()
|
| 52 |
|
|
|
|
| 53 |
MODEL_LIB = {'RUBASE': giga_gen, 'TINYLLAMA': tiny_gen, 'QWEN2INS1B': qwen_gen}
|
| 54 |
|
| 55 |
def tab_arena():
|
|
|
|
| 57 |
with gradio.Column():
|
| 58 |
model_left = gradio.Dropdown(["TINYLLAMA", "QWEN2INS1B", "RUBASE"], value="TINYLLAMA", interactive=True, multiselect=False, label="Left model")
|
| 59 |
chatbot_left = gradio.Chatbot()
|
| 60 |
+
model_left.change(model_gen, [gradio.Textbox(), model_left, gradio.Chatbot()], [gradio.Textbox(), chatbot_left])
|
| 61 |
with gradio.Column():
|
| 62 |
model_right = gradio.Dropdown(["TINYLLAMA", "QWEN2INS1B", "RUBASE"], value= "RUBASE", interactive=True, multiselect=False, label="Right model")
|
| 63 |
chatbot_right = gradio.Chatbot()
|
| 64 |
+
model_right.change(model_gen, [gradio.Textbox(), model_right, gradio.Chatbot()], [gradio.Textbox(), chatbot_right])
|
| 65 |
|
| 66 |
with gradio.Row():
|
| 67 |
gradio.Button('Both Good')
|