Pendrokar commited on
Commit
193c0b7
1 Parent(s): 0fc7cd1

Pandas warnings fixed

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -605,7 +605,7 @@ def get_leaderboard(reveal_prelim = False):
605
  # df['license'] = df['name'].map(model_license)
606
  df['name'] = df['name'].replace(model_names)
607
  for i in range(len(df)):
608
- df['name'][i] = make_link_to_space(df['name'][i])
609
  df['votes'] = df['upvote'] + df['downvote']
610
  # df['score'] = round((df['upvote'] / df['votes']) * 100, 2) # Percentage score
611
 
@@ -618,8 +618,8 @@ def get_leaderboard(reveal_prelim = False):
618
  expected_b = 1 / (1 + 10 ** ((df['score'][i] - df['score'][j]) / 400))
619
  actual_a = df['upvote'][i] / df['votes'][i]
620
  actual_b = df['upvote'][j] / df['votes'][j]
621
- df.at[i, 'score'] += 32 * (actual_a - expected_a)
622
- df.at[j, 'score'] += 32 * (actual_b - expected_b)
623
  df['score'] = round(df['score'])
624
  ## ELO SCORE
625
  df = df.sort_values(by='score', ascending=False)
 
605
  # df['license'] = df['name'].map(model_license)
606
  df['name'] = df['name'].replace(model_names)
607
  for i in range(len(df)):
608
+ df.loc[i, "name"] = make_link_to_space(df['name'][i])
609
  df['votes'] = df['upvote'] + df['downvote']
610
  # df['score'] = round((df['upvote'] / df['votes']) * 100, 2) # Percentage score
611
 
 
618
  expected_b = 1 / (1 + 10 ** ((df['score'][i] - df['score'][j]) / 400))
619
  actual_a = df['upvote'][i] / df['votes'][i]
620
  actual_b = df['upvote'][j] / df['votes'][j]
621
+ df.at[i, 'score'] += round(32 * (actual_a - expected_a))
622
+ df.at[j, 'score'] += round(32 * (actual_b - expected_b))
623
  df['score'] = round(df['score'])
624
  ## ELO SCORE
625
  df = df.sort_values(by='score', ascending=False)