Pendrokar commited on
Commit
faa1fb8
·
1 Parent(s): 3853352

past 3 month rejections for unavailable models

Browse files
Files changed (1) hide show
  1. app/leaderboard.py +11 -1
app/leaderboard.py CHANGED
@@ -55,8 +55,18 @@ def get_leaderboard(reveal_prelim = False):
55
  ):
56
  style = 'text-decoration: underline;text-decoration-style: dotted; color: var(--link-text-color);'
57
  title = 'See rejections'
 
 
 
 
 
 
 
 
 
 
58
  # win rate dataset
59
- df.at[i, 'Win Rate'] = f'<a target="_blank" style="{style}" title="{title}" href="https://huggingface.co/datasets/{DB_DATASET_ID}/viewer/summary/rejections?f[rejected][value]=%27{orig_name}%27">' + df['Win Rate'].iloc[i] + '</a>'
60
  df['Elo'] = round(df['Elo'])
61
  df['Elo Diff'] = df['Elo']
62
 
 
55
  ):
56
  style = 'text-decoration: underline;text-decoration-style: dotted; color: var(--link-text-color);'
57
  title = 'See rejections'
58
+
59
+ if (orig_name in AVAILABLE_MODELS.keys()):
60
+ # show rejections for the past month
61
+ dataset_name = 'rejections'
62
+ title += ' (past month)'
63
+ else:
64
+ # show all rejections when model is unavailable
65
+ dataset_name = 'rejections_all'
66
+ title += ' (all)'
67
+ href = 'https://huggingface.co/datasets/{DB_DATASET_ID}/viewer/summary/{dataset_name}}?f[rejected][value]=%27{orig_name}%27'
68
  # win rate dataset
69
+ df.at[i, 'Win Rate'] = f'<a target="_blank" style="{style}" title="{title}" href="{href}">' + df['Win Rate'].iloc[i] + '</a>'
70
  df['Elo'] = round(df['Elo'])
71
  df['Elo Diff'] = df['Elo']
72