Spaces:
Sleeping
Sleeping
[Update]Add loop
Browse files
app.py
CHANGED
@@ -228,26 +228,68 @@ with demo:
|
|
228 |
for i in range(len(files)):
|
229 |
if files[i] == "church":
|
230 |
name = "### Unlearned Objects "+" Church"
|
|
|
231 |
elif files[i] == 'garbage':
|
232 |
name = "### Unlearned Objects "+" Garbage"
|
|
|
233 |
elif files[i] == 'tench':
|
234 |
name = "### Unlearned Objects "+" Tench"
|
|
|
235 |
elif files[i] == 'parachute':
|
236 |
name = "### Unlearned Objects "+" Parachute"
|
|
|
237 |
elif files[i] == 'vangogh':
|
238 |
name = "### Unlearned Stype "+" Van Gogh"
|
|
|
239 |
elif files[i] == 'nudity':
|
240 |
name = "### Unlearned Concepts "+" Nudity"
|
|
|
241 |
elif files[i] == 'violence':
|
242 |
name = "### Unlearned Concepts "+" Violence"
|
|
|
243 |
elif files[i] == 'ill':
|
244 |
name = "### Unlearned Concepts "+" Illgal Activity"
|
|
|
245 |
|
246 |
|
247 |
|
248 |
|
249 |
|
250 |
gr.Markdown(name)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
gr.Markdown("### Unlearned Concepts Parachute")
|
252 |
leaderboard_table = gr.components.Dataframe(
|
253 |
value = df_results,
|
|
|
228 |
for i in range(len(files)):
|
229 |
if files[i] == "church":
|
230 |
name = "### Unlearned Objects "+" Church"
|
231 |
+
csv_path = './assests/'+files[i]+'.csv'
|
232 |
elif files[i] == 'garbage':
|
233 |
name = "### Unlearned Objects "+" Garbage"
|
234 |
+
csv_path = './assests/'+files[i]+'.csv'
|
235 |
elif files[i] == 'tench':
|
236 |
name = "### Unlearned Objects "+" Tench"
|
237 |
+
csv_path = './assests/'+files[i]+'.csv'
|
238 |
elif files[i] == 'parachute':
|
239 |
name = "### Unlearned Objects "+" Parachute"
|
240 |
+
csv_path = './assests/'+files[i]+'.csv'
|
241 |
elif files[i] == 'vangogh':
|
242 |
name = "### Unlearned Stype "+" Van Gogh"
|
243 |
+
csv_path = './assests/'+files[i]+'.csv'
|
244 |
elif files[i] == 'nudity':
|
245 |
name = "### Unlearned Concepts "+" Nudity"
|
246 |
+
csv_path = './assests/'+files[i]+'.csv'
|
247 |
elif files[i] == 'violence':
|
248 |
name = "### Unlearned Concepts "+" Violence"
|
249 |
+
csv_path = './assests/'+files[i]+'.csv'
|
250 |
elif files[i] == 'ill':
|
251 |
name = "### Unlearned Concepts "+" Illgal Activity"
|
252 |
+
csv_path = './assests/'+files[i]+'.csv'
|
253 |
|
254 |
|
255 |
|
256 |
|
257 |
|
258 |
gr.Markdown(name)
|
259 |
+
df_results = load_data(csv_path)
|
260 |
+
leaderboard_table = gr.components.Dataframe(
|
261 |
+
value = df_results,
|
262 |
+
datatype = TYPES,
|
263 |
+
elem_id = "leaderboard-table",
|
264 |
+
interactive = False,
|
265 |
+
visible=True,
|
266 |
+
)
|
267 |
+
|
268 |
+
|
269 |
+
hidden_leaderboard_table_for_search = gr.components.Dataframe(
|
270 |
+
value=df_results_init,
|
271 |
+
# elem_id="leaderboard-table",
|
272 |
+
interactive=False,
|
273 |
+
visible=False,
|
274 |
+
)
|
275 |
+
|
276 |
+
search_bar.submit(
|
277 |
+
update_table,
|
278 |
+
[
|
279 |
+
# df_avg,
|
280 |
+
hidden_leaderboard_table_for_search,
|
281 |
+
model1_column,
|
282 |
+
# shown_columns,
|
283 |
+
#type_query,
|
284 |
+
#open_query,
|
285 |
+
# filter_columns_type,
|
286 |
+
# filter_columns_precision,
|
287 |
+
# filter_columns_size,
|
288 |
+
# deleted_models_visibility,
|
289 |
+
search_bar,
|
290 |
+
],
|
291 |
+
leaderboard_table,
|
292 |
+
)
|
293 |
gr.Markdown("### Unlearned Concepts Parachute")
|
294 |
leaderboard_table = gr.components.Dataframe(
|
295 |
value = df_results,
|