apsys commited on
Commit
54daf32
·
1 Parent(s): 935d31d
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -264,7 +264,7 @@ def init_leaderboard(dataframe, visible_columns=None):
264
 
265
  # Select only the visible columns for display
266
  visible_columns.remove('model_name')
267
-
268
  visible_columns = ['model_name'] + visible_columns
269
  display_df = dataframe[visible_columns].copy()
270
 
@@ -280,8 +280,10 @@ def init_leaderboard(dataframe, visible_columns=None):
280
  # Format floats to exactly 3 decimal places, preserving trailing zeros
281
  display_df[col] = display_df[col].apply(lambda x: f"{x:.3f}" if pd.notna(x) else None)
282
 
 
 
283
  return gr.Dataframe(
284
- value=display_df,
285
  headers=visible_columns,
286
  datatype=datatypes, # Now using the correct format
287
  interactive=False,
 
264
 
265
  # Select only the visible columns for display
266
  visible_columns.remove('model_name')
267
+
268
  visible_columns = ['model_name'] + visible_columns
269
  display_df = dataframe[visible_columns].copy()
270
 
 
280
  # Format floats to exactly 3 decimal places, preserving trailing zeros
281
  display_df[col] = display_df[col].apply(lambda x: f"{x:.3f}" if pd.notna(x) else None)
282
 
283
+ styler = display_df.style.set_properties(**{'text-align': 'right'})
284
+
285
  return gr.Dataframe(
286
+ value=styler,
287
  headers=visible_columns,
288
  datatype=datatypes, # Now using the correct format
289
  interactive=False,