remove "all" default in device/backend choice
#2
by
Steveeeeeeen
HF Staff
- opened
app.py
CHANGED
|
@@ -141,13 +141,13 @@ with gr.Blocks(css=LEADERBOARD_CSS) as demo:
|
|
| 141 |
|
| 142 |
with gr.Row():
|
| 143 |
backend_filter = gr.Dropdown(
|
| 144 |
-
choices=
|
| 145 |
value="All",
|
| 146 |
label="Filter by Backend",
|
| 147 |
elem_id="backend-filter",
|
| 148 |
multiselect=True # Enable multiple selection
|
| 149 |
)
|
| 150 |
-
device_choices =
|
| 151 |
device_filter = gr.Dropdown(
|
| 152 |
choices=device_choices,
|
| 153 |
value="All",
|
|
|
|
| 141 |
|
| 142 |
with gr.Row():
|
| 143 |
backend_filter = gr.Dropdown(
|
| 144 |
+
choices= sorted(whisper_df["Backend"].unique().tolist()),
|
| 145 |
value="All",
|
| 146 |
label="Filter by Backend",
|
| 147 |
elem_id="backend-filter",
|
| 148 |
multiselect=True # Enable multiple selection
|
| 149 |
)
|
| 150 |
+
device_choices = sorted(whisper_df["Device"].unique().tolist()) if "Device" in whisper_df.columns else ["All"]
|
| 151 |
device_filter = gr.Dropdown(
|
| 152 |
choices=device_choices,
|
| 153 |
value="All",
|