yuchenlin commited on
Commit
e6fa278
1 Parent(s): 810d25e
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -45,6 +45,9 @@ model_info = {
45
  }
46
 
47
 
 
 
 
48
 
49
  def make_clickable_model(model_name, model_info):
50
  if model_info[model_name]['hf_name'].startswith("http"):
@@ -105,9 +108,8 @@ if __name__ == "__main__":
105
  for col in original_df.columns:
106
  if col == "model":
107
  original_df[col] = original_df[col].apply(lambda x: x.replace(x, make_clickable_model(x, model_info)))
108
- else:
109
- pass
110
- # original_df[col] = original_df[col].apply(formatter) # For numerical values
111
 
112
  # Define the first column explicitly, add 'Overall' as the second column, and then append the rest excluding 'Overall'
113
  new_order = [original_df.columns[0], 'Overall'] + [col for col in original_df.columns if col not in [original_df.columns[0], 'Overall']]
 
45
  }
46
 
47
 
48
+ def formatter(x):
49
+ x = round(x, 2)
50
+ return x
51
 
52
  def make_clickable_model(model_name, model_info):
53
  if model_info[model_name]['hf_name'].startswith("http"):
 
108
  for col in original_df.columns:
109
  if col == "model":
110
  original_df[col] = original_df[col].apply(lambda x: x.replace(x, make_clickable_model(x, model_info)))
111
+ else:
112
+ original_df[col] = original_df[col].apply(formatter) # For numerical values
 
113
 
114
  # Define the first column explicitly, add 'Overall' as the second column, and then append the rest excluding 'Overall'
115
  new_order = [original_df.columns[0], 'Overall'] + [col for col in original_df.columns if col not in [original_df.columns[0], 'Overall']]