Spaces:
Runtime error
Runtime error
Refactor GET_DEFAULT_CHECKBOX function to remove "Model Name" column and handle exceptions in app.py
Browse files
app.py
CHANGED
@@ -130,7 +130,7 @@ def init_leaderboard(dataframes):
|
|
130 |
filtered_data.sort_values(by="Total", ascending=False, inplace=True)
|
131 |
# selected_columns.append("Model Name")
|
132 |
selected_columns = [
|
133 |
-
c for c in filtered_data.columns if c in selected_columns or c == "Model Name"
|
134 |
]
|
135 |
# selected_columns = [c.name for c in fields(AutoEvalColumn) if c.name in selected_columns]
|
136 |
selected_data = filtered_data[selected_columns]
|
|
|
130 |
filtered_data.sort_values(by="Total", ascending=False, inplace=True)
|
131 |
# selected_columns.append("Model Name")
|
132 |
selected_columns = [
|
133 |
+
c for c in filtered_data.columns if c in selected_columns.value or c == "Model Name"
|
134 |
]
|
135 |
# selected_columns = [c.name for c in fields(AutoEvalColumn) if c.name in selected_columns]
|
136 |
selected_data = filtered_data[selected_columns]
|