Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -151,7 +151,7 @@ with gr.Blocks(css="""
|
|
| 151 |
label="Dataset",
|
| 152 |
info="Select a dataset to perform the Head-to-Head Evaluation on. Available Datasets: [MMLU-Pro](https://huggingface.co/datasets/TIGER-Lab/MMLU-Pro)"
|
| 153 |
)
|
| 154 |
-
preview_toggle = gr.Button("Show Preview", interactive=False, variant="secondary")
|
| 155 |
|
| 156 |
# Dataset Preview Container - Initially hidden
|
| 157 |
with gr.Column(visible=False) as dataset_preview_container:
|
|
@@ -250,7 +250,7 @@ with gr.Blocks(css="""
|
|
| 250 |
gr.update(interactive=True), # preview_toggle
|
| 251 |
gr.update(visible=False), # dataset_preview_container - hide it initially
|
| 252 |
False, # Reset preview_visibility to False
|
| 253 |
-
gr.update(value="Show Preview") # Reset button text
|
| 254 |
)
|
| 255 |
else:
|
| 256 |
return (
|
|
@@ -259,7 +259,7 @@ with gr.Blocks(css="""
|
|
| 259 |
gr.update(interactive=False), # preview_toggle
|
| 260 |
gr.update(visible=False), # dataset_preview_container - hide when no dataset
|
| 261 |
False, # Reset preview_visibility to False
|
| 262 |
-
gr.update(value="Show Preview") # Reset button text
|
| 263 |
)
|
| 264 |
|
| 265 |
# Connect dataset dropdown to show/hide appropriate configuration
|
|
@@ -275,7 +275,7 @@ with gr.Blocks(css="""
|
|
| 275 |
is_visible = not preview_visibility
|
| 276 |
|
| 277 |
# Update button text based on new state
|
| 278 |
-
button_text = "Hide Preview" if is_visible else "Show Preview"
|
| 279 |
|
| 280 |
# Get preview data if becoming visible
|
| 281 |
if is_visible and dataset == "MMLU-Pro":
|
|
|
|
| 151 |
label="Dataset",
|
| 152 |
info="Select a dataset to perform the Head-to-Head Evaluation on. Available Datasets: [MMLU-Pro](https://huggingface.co/datasets/TIGER-Lab/MMLU-Pro)"
|
| 153 |
)
|
| 154 |
+
preview_toggle = gr.Button("Show Dataset Preview", interactive=False, variant="secondary")
|
| 155 |
|
| 156 |
# Dataset Preview Container - Initially hidden
|
| 157 |
with gr.Column(visible=False) as dataset_preview_container:
|
|
|
|
| 250 |
gr.update(interactive=True), # preview_toggle
|
| 251 |
gr.update(visible=False), # dataset_preview_container - hide it initially
|
| 252 |
False, # Reset preview_visibility to False
|
| 253 |
+
gr.update(value="Show Dataset Preview") # Reset button text
|
| 254 |
)
|
| 255 |
else:
|
| 256 |
return (
|
|
|
|
| 259 |
gr.update(interactive=False), # preview_toggle
|
| 260 |
gr.update(visible=False), # dataset_preview_container - hide when no dataset
|
| 261 |
False, # Reset preview_visibility to False
|
| 262 |
+
gr.update(value="Show Dataset Preview") # Reset button text
|
| 263 |
)
|
| 264 |
|
| 265 |
# Connect dataset dropdown to show/hide appropriate configuration
|
|
|
|
| 275 |
is_visible = not preview_visibility
|
| 276 |
|
| 277 |
# Update button text based on new state
|
| 278 |
+
button_text = "Hide Dataset Preview" if is_visible else "Show Dataset Preview"
|
| 279 |
|
| 280 |
# Get preview data if becoming visible
|
| 281 |
if is_visible and dataset == "MMLU-Pro":
|