kz209 commited on
Commit
f06ca02
β€’
1 Parent(s): 214ffa6
Files changed (1) hide show
  1. pages/leaderboard.py +5 -4
pages/leaderboard.py CHANGED
@@ -20,14 +20,15 @@ data = {
20
  }
21
 
22
  df = pd.DataFrame(data)
 
 
 
 
 
23
 
24
  def update_leaderboard(sort_by):
25
  # In a real implementation, this would filter the data based on the category
26
  sorted_df = df.sort_values(by=sort_by, ascending=False)
27
-
28
- sorted_df.iloc[0]['Authors'] = sorted_df.iloc[0]['Authors'] + 'πŸ…'
29
- sorted_df.iloc[0]['Authors'] = sorted_df.iloc[0]['Authors'] + 'πŸ₯ˆ'
30
- sorted_df.iloc[0]['Authors'] = sorted_df.iloc[0]['Authors'] + 'πŸ₯‰'
31
 
32
  # Update ranks based on new sorting
33
  sorted_df['Rank'] = range(1, len(sorted_df) + 1)
 
20
  }
21
 
22
  df = pd.DataFrame(data)
23
+ df = df.sort_values(by='Rouge Score', ascending=False)
24
+
25
+ df.loc[0]['Authors'] = 'πŸ… '+df.loc[0]['Authors']
26
+ df.loc[1]['Authors'] = 'πŸ₯ˆ '+df.loc[1]['Authors']
27
+ df.loc[2]['Authors'] = 'πŸ₯‰ '+df.loc[2]['Authors']
28
 
29
  def update_leaderboard(sort_by):
30
  # In a real implementation, this would filter the data based on the category
31
  sorted_df = df.sort_values(by=sort_by, ascending=False)
 
 
 
 
32
 
33
  # Update ranks based on new sorting
34
  sorted_df['Rank'] = range(1, len(sorted_df) + 1)