Spaces:
Runtime error
Runtime error
Refactor init_leaderboard function to use the last subset as the default value for the dropdown
Browse files
app.py
CHANGED
@@ -69,8 +69,9 @@ LEADERBOARD_DF, SUBSETS = get_leaderboard_df(RESULTS_REPO)
|
|
69 |
|
70 |
|
71 |
def init_leaderboard(dataframes, subsets):
|
72 |
-
|
73 |
-
|
|
|
74 |
return Leaderboard(
|
75 |
value=dataframes,
|
76 |
datatype=[c.type for c in fields(AutoEvalColumn)],
|
|
|
69 |
|
70 |
|
71 |
def init_leaderboard(dataframes, subsets):
|
72 |
+
subsets = list(subsets)
|
73 |
+
selected_subset = gr.Dropdown(choices=subsets, label="Select Dataset Subset", value=subsets[-1])
|
74 |
+
|
75 |
return Leaderboard(
|
76 |
value=dataframes,
|
77 |
datatype=[c.type for c in fields(AutoEvalColumn)],
|