mgyigit commited on
Commit
320a6c3
·
verified ·
1 Parent(s): 87921bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -105,7 +105,13 @@ def update_metrics(selected_benchmarks):
105
 
106
 
107
  def update_leaderboard(selected_methods, selected_metrics):
108
- return get_baseline_df(selected_methods, selected_metrics)
 
 
 
 
 
 
109
 
110
  def style_methods(val):
111
  """Given a model name, return a CSS style string."""
 
105
 
106
 
107
  def update_leaderboard(selected_methods, selected_metrics):
108
+ # 1) get the df
109
+ df = get_baseline_df(selected_methods, selected_metrics)
110
+ # 2) round floats
111
+ df = df.applymap(lambda x: round(x, 4) if isinstance(x, (int, float)) else x)
112
+ # 3) apply your colour‐styling to the Method column
113
+ styled = df.style.applymap(style_methods, subset=["Method"])
114
+ return styled
115
 
116
  def style_methods(val):
117
  """Given a model name, return a CSS style string."""