Spaces:
Sleeping
Sleeping
kz209
commited on
Commit
β’
f06ca02
1
Parent(s):
214ffa6
update
Browse files- 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)
|