style theme
Browse files
app.py
CHANGED
|
@@ -277,17 +277,10 @@ def init_leaderboard(dataframe, visible_columns=None):
|
|
| 277 |
if not pd.api.types.is_integer_dtype(display_df[col]):
|
| 278 |
display_df[col] = display_df[col].round(3)
|
| 279 |
|
| 280 |
-
# Create a mapping from internal names to display names
|
| 281 |
-
all_choices = get_all_column_choices()
|
| 282 |
-
display_name_map = {internal_name: display_name for internal_name, display_name in all_choices}
|
| 283 |
-
|
| 284 |
-
# Generate the list of headers to display based on the visible internal column names
|
| 285 |
-
display_headers = [display_name_map.get(col, col) for col in visible_columns] # Default to internal name if no mapping found
|
| 286 |
-
|
| 287 |
return gr.Dataframe(
|
| 288 |
-
value=display_df,
|
| 289 |
-
headers=
|
| 290 |
-
datatype=datatypes,
|
| 291 |
interactive=False,
|
| 292 |
wrap=True,
|
| 293 |
elem_id="leaderboard-table",
|
|
|
|
| 277 |
if not pd.api.types.is_integer_dtype(display_df[col]):
|
| 278 |
display_df[col] = display_df[col].round(3)
|
| 279 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 280 |
return gr.Dataframe(
|
| 281 |
+
value=display_df,
|
| 282 |
+
headers=visible_columns,
|
| 283 |
+
datatype=datatypes, # Now using the correct format
|
| 284 |
interactive=False,
|
| 285 |
wrap=True,
|
| 286 |
elem_id="leaderboard-table",
|