Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -134,20 +134,16 @@ def sort_data(architecture, purpose, sdr_metric):
|
|
134 |
df = df[df['Architecture'] == architecture]
|
135 |
if purpose != "All":
|
136 |
df = df[df['Purpose'] == purpose]
|
137 |
-
if sdr_metric != "All":
|
138 |
-
df = df.sort_values(by=sdr_metric, ascending=False)
|
139 |
|
140 |
return df
|
141 |
|
142 |
def create_leaderboard_tab():
|
143 |
architectures = ["All", "Roformer", "MDXC", "MDX", "VR-ARCH", "DEMUCS", "Other"]
|
144 |
purposes = ["All", "VocInst", "DeEcho", "DeReverb", "DeNoise", "Karaoke", "Crowd", "Other"]
|
145 |
-
sdr_metrics = ["All", "Vocal SDR", "Instrumental SDR", "Drums SDR", "Bass SDR", "Guitar SDR", "Piano SDR", "Other SDR"]
|
146 |
|
147 |
with gr.Row():
|
148 |
architecture_dropdown = gr.Dropdown(choices=architectures, label="Architecture")
|
149 |
purpose_dropdown = gr.Dropdown(choices=purposes, label="Purpose")
|
150 |
-
sdr_metric_dropdown = gr.Dropdown(choices=sdr_metrics, label="SDR Metric")
|
151 |
|
152 |
with gr.Row():
|
153 |
sort_button = gr.Button("Sort Models", variant="primary")
|
@@ -157,7 +153,7 @@ def create_leaderboard_tab():
|
|
157 |
|
158 |
sort_button.click(
|
159 |
sort_data,
|
160 |
-
inputs=[architecture_dropdown, purpose_dropdown
|
161 |
outputs=leaderboard_output
|
162 |
)
|
163 |
|
|
|
134 |
df = df[df['Architecture'] == architecture]
|
135 |
if purpose != "All":
|
136 |
df = df[df['Purpose'] == purpose]
|
|
|
|
|
137 |
|
138 |
return df
|
139 |
|
140 |
def create_leaderboard_tab():
|
141 |
architectures = ["All", "Roformer", "MDXC", "MDX", "VR-ARCH", "DEMUCS", "Other"]
|
142 |
purposes = ["All", "VocInst", "DeEcho", "DeReverb", "DeNoise", "Karaoke", "Crowd", "Other"]
|
|
|
143 |
|
144 |
with gr.Row():
|
145 |
architecture_dropdown = gr.Dropdown(choices=architectures, label="Architecture")
|
146 |
purpose_dropdown = gr.Dropdown(choices=purposes, label="Purpose")
|
|
|
147 |
|
148 |
with gr.Row():
|
149 |
sort_button = gr.Button("Sort Models", variant="primary")
|
|
|
153 |
|
154 |
sort_button.click(
|
155 |
sort_data,
|
156 |
+
inputs=[architecture_dropdown, purpose_dropdown],
|
157 |
outputs=leaderboard_output
|
158 |
)
|
159 |
|