Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -55,8 +55,8 @@ def create_demo():
|
|
55 |
gr.Markdown("# AI Model Comparison Tool 🌟")
|
56 |
gr.Markdown(
|
57 |
"""
|
58 |
-
Compare responses from
|
59 |
-
Select models, ask a question, and
|
60 |
"""
|
61 |
)
|
62 |
|
@@ -75,12 +75,13 @@ def create_demo():
|
|
75 |
minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"
|
76 |
)
|
77 |
|
78 |
-
# Model Selection Section
|
79 |
with gr.Row():
|
80 |
selected_models = gr.CheckboxGroup(
|
81 |
choices=list(model_options.keys()),
|
82 |
-
label="Select models to compare",
|
83 |
value=["Llama-3.1-70B", "Qwen-2.5-1.5B-Instruct"], # Default models
|
|
|
84 |
)
|
85 |
|
86 |
# Dynamic Response Section
|
@@ -89,7 +90,7 @@ def create_demo():
|
|
89 |
def generate_response_boxes(models):
|
90 |
# Clear current components
|
91 |
response_boxes.clear()
|
92 |
-
# Add new response boxes dynamically
|
93 |
for model_name in models:
|
94 |
with gr.Column() as response_column:
|
95 |
response_box = gr.Textbox(label=f"Response from {model_name}", interactive=False)
|
|
|
55 |
gr.Markdown("# AI Model Comparison Tool 🌟")
|
56 |
gr.Markdown(
|
57 |
"""
|
58 |
+
Compare responses from two AI models side-by-side.
|
59 |
+
Select two models, ask a question, and compare their responses in real time!
|
60 |
"""
|
61 |
)
|
62 |
|
|
|
75 |
minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"
|
76 |
)
|
77 |
|
78 |
+
# Model Selection Section (limit to two models)
|
79 |
with gr.Row():
|
80 |
selected_models = gr.CheckboxGroup(
|
81 |
choices=list(model_options.keys()),
|
82 |
+
label="Select two models to compare",
|
83 |
value=["Llama-3.1-70B", "Qwen-2.5-1.5B-Instruct"], # Default models
|
84 |
+
maximum_choices=2, # Limit to two models
|
85 |
)
|
86 |
|
87 |
# Dynamic Response Section
|
|
|
90 |
def generate_response_boxes(models):
|
91 |
# Clear current components
|
92 |
response_boxes.clear()
|
93 |
+
# Add new response boxes dynamically for only two models
|
94 |
for model_name in models:
|
95 |
with gr.Column() as response_column:
|
96 |
response_box = gr.Textbox(label=f"Response from {model_name}", interactive=False)
|