rwightman HF staff commited on
Commit
0bcf830
·
verified ·
1 Parent(s): 5b13af9

get 2 decimal places back, remove highlighted col from display

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -161,9 +161,9 @@ def update_leaderboard_and_plot(
161
  combined_df = filtered_df
162
 
163
  fig = create_scatter_plot(combined_df, x_axis, y_axis)
164
- highlighted_df = combined_df.style.apply(lambda x: ['background-color: #FFA500' if x['highlighted'] else '' for _ in x], axis=1)
165
-
166
- return highlighted_df, fig
167
 
168
 
169
  with gr.Blocks(title="The timm Leaderboard") as app:
 
161
  combined_df = filtered_df
162
 
163
  fig = create_scatter_plot(combined_df, x_axis, y_axis)
164
+ display_df = combined_df.drop(columns=['highlighted'])
165
+ display_df = display_df.style.apply(lambda x: ['background-color: #FFA500' if combined_df.loc[x.name, 'highlighted'] else '' for _ in x], axis=1).format(precision=2)
166
+ return display_df, fig
167
 
168
 
169
  with gr.Blocks(title="The timm Leaderboard") as app: