Commit
·
54eeb26
1
Parent(s):
b7ebe27
refine
Browse files
app.py
CHANGED
@@ -204,12 +204,12 @@ with demo:
|
|
204 |
if files[i] == "church":
|
205 |
name = "### [Unlearned Objects] "+" Church"
|
206 |
csv_path = './assets/'+files[i]+'.csv'
|
207 |
-
elif files[i] == 'garbage':
|
208 |
-
|
209 |
-
|
210 |
-
elif files[i] == 'tench':
|
211 |
-
|
212 |
-
|
213 |
elif files[i] == 'parachute':
|
214 |
name = "### [Unlearned Objects] "+" Parachute"
|
215 |
csv_path = './assets/'+files[i]+'.csv'
|
@@ -267,6 +267,70 @@ with demo:
|
|
267 |
],
|
268 |
leaderboard_table,
|
269 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
|
271 |
|
272 |
|
|
|
204 |
if files[i] == "church":
|
205 |
name = "### [Unlearned Objects] "+" Church"
|
206 |
csv_path = './assets/'+files[i]+'.csv'
|
207 |
+
# elif files[i] == 'garbage':
|
208 |
+
# name = "### [Unlearned Objects] "+" Garbage"
|
209 |
+
# csv_path = './assets/'+files[i]+'.csv'
|
210 |
+
# elif files[i] == 'tench':
|
211 |
+
# name = "### [Unlearned Objects] "+" Tench"
|
212 |
+
# csv_path = './assets/'+files[i]+'.csv'
|
213 |
elif files[i] == 'parachute':
|
214 |
name = "### [Unlearned Objects] "+" Parachute"
|
215 |
csv_path = './assets/'+files[i]+'.csv'
|
|
|
267 |
],
|
268 |
leaderboard_table,
|
269 |
)
|
270 |
+
|
271 |
+
with gr.TabItem("Style", elem_id="Style", id=1):
|
272 |
+
with gr.Row():
|
273 |
+
with gr.Column():
|
274 |
+
with gr.Row():
|
275 |
+
search_bar = gr.Textbox(
|
276 |
+
placeholder=" 🔍 Search for your model (separate multiple queries with `;`) and press ENTER...",
|
277 |
+
show_label=False,
|
278 |
+
elem_id="search-bar",
|
279 |
+
)
|
280 |
+
with gr.Row():
|
281 |
+
model1_column = gr.CheckboxGroup(
|
282 |
+
label="Evaluation Metrics",
|
283 |
+
choices=['Pre-ASR','Post-ASR','FID','CLIP-Score'],
|
284 |
+
interactive=True,
|
285 |
+
elem_id="column-select",
|
286 |
+
)
|
287 |
+
|
288 |
+
for i in range(len(files)):
|
289 |
+
|
290 |
+
if files[i] == 'vangogh':
|
291 |
+
name = "### [Unlearned Style] "+" Van Gogh"
|
292 |
+
csv_path = './assets/'+files[i]+'.csv'
|
293 |
+
|
294 |
+
gr.Markdown(name)
|
295 |
+
df_results = load_data(csv_path)
|
296 |
+
df_results_init = df_results.copy()[show_columns]
|
297 |
+
leaderboard_table = gr.components.Dataframe(
|
298 |
+
value = df_results,
|
299 |
+
datatype = TYPES,
|
300 |
+
elem_id = "leaderboard-table",
|
301 |
+
interactive = False,
|
302 |
+
visible=True,
|
303 |
+
)
|
304 |
+
|
305 |
+
|
306 |
+
hidden_leaderboard_table_for_search = gr.components.Dataframe(
|
307 |
+
value=df_results_init,
|
308 |
+
# value=df_results,
|
309 |
+
interactive=False,
|
310 |
+
visible=False,
|
311 |
+
)
|
312 |
+
|
313 |
+
search_bar.submit(
|
314 |
+
update_table,
|
315 |
+
[
|
316 |
+
|
317 |
+
hidden_leaderboard_table_for_search,
|
318 |
+
model1_column,
|
319 |
+
search_bar,
|
320 |
+
],
|
321 |
+
leaderboard_table,
|
322 |
+
)
|
323 |
+
|
324 |
+
for selector in [model1_column]:
|
325 |
+
selector.change(
|
326 |
+
update_table,
|
327 |
+
[
|
328 |
+
hidden_leaderboard_table_for_search,
|
329 |
+
model1_column,
|
330 |
+
search_bar,
|
331 |
+
],
|
332 |
+
leaderboard_table,
|
333 |
+
)
|
334 |
|
335 |
|
336 |
|