Spaces:
Runtime error
Runtime error
Refactor GET_DEFAULT_CHECKBOX function to use choices instead of value for selected columns in app.py
Browse files
app.py
CHANGED
@@ -81,6 +81,7 @@ def GET_DEFAULT_TEXTBOX():
|
|
81 |
|
82 |
def GET_DEFAULT_CHECKBOX(subset):
|
83 |
choices = list(LEADERBOARD_DF[subset].columns)
|
|
|
84 |
choices.remove("Model Name")
|
85 |
# print("Choices:", [c.name for c in fields(AutoEvalColumn) if not c.hidden])
|
86 |
return gr.CheckboxGroup(
|
@@ -126,7 +127,7 @@ def init_leaderboard(dataframes):
|
|
126 |
print("Search Term:", search_term)
|
127 |
print("Selected Columns:", selected_columns)
|
128 |
if isinstance(selected_columns, CheckboxGroup):
|
129 |
-
print("Selected Columns:", selected_columns.
|
130 |
bak_selected_columns = copy.deepcopy(selected_columns)
|
131 |
old_version = subset
|
132 |
filtered_data = dataframes[subset]
|
|
|
81 |
|
82 |
def GET_DEFAULT_CHECKBOX(subset):
|
83 |
choices = list(LEADERBOARD_DF[subset].columns)
|
84 |
+
print("Choices:", choices)
|
85 |
choices.remove("Model Name")
|
86 |
# print("Choices:", [c.name for c in fields(AutoEvalColumn) if not c.hidden])
|
87 |
return gr.CheckboxGroup(
|
|
|
127 |
print("Search Term:", search_term)
|
128 |
print("Selected Columns:", selected_columns)
|
129 |
if isinstance(selected_columns, CheckboxGroup):
|
130 |
+
print("Selected Columns:", selected_columns.choices)
|
131 |
bak_selected_columns = copy.deepcopy(selected_columns)
|
132 |
old_version = subset
|
133 |
filtered_data = dataframes[subset]
|