Spaces:
Sleeping
Sleeping
kz209
commited on
Commit
Β·
08a24e4
1
Parent(s):
cf67732
update
Browse files- pages/leaderboard.py +3 -2
pages/leaderboard.py
CHANGED
@@ -20,7 +20,8 @@ data = {
|
|
20 |
}
|
21 |
|
22 |
df = pd.DataFrame(data)
|
23 |
-
df.sort_values(by='Rouge Score', ascending=False, inplace=True)
|
|
|
24 |
|
25 |
# Define a list of medal emojis
|
26 |
medals = ['π
', 'π₯', 'π₯']
|
@@ -29,7 +30,7 @@ for i in range(3):
|
|
29 |
|
30 |
def update_leaderboard(sort_by):
|
31 |
# In a real implementation, this would filter the data based on the category
|
32 |
-
sorted_df = df.sort_values(by=sort_by, ascending=False)
|
33 |
|
34 |
# Update ranks based on new sorting
|
35 |
sorted_df['Rank'] = range(1, len(sorted_df) + 1)
|
|
|
20 |
}
|
21 |
|
22 |
df = pd.DataFrame(data)
|
23 |
+
df.sort_values(by='Rouge Score', ascending=False, inplace=True, ignore_index=True)
|
24 |
+
df['Rank'] = range(1, len(df) + 1)
|
25 |
|
26 |
# Define a list of medal emojis
|
27 |
medals = ['π
', 'π₯', 'π₯']
|
|
|
30 |
|
31 |
def update_leaderboard(sort_by):
|
32 |
# In a real implementation, this would filter the data based on the category
|
33 |
+
sorted_df = df.sort_values(by=sort_by, ascending=False, ignore_index=True)
|
34 |
|
35 |
# Update ranks based on new sorting
|
36 |
sorted_df['Rank'] = range(1, len(sorted_df) + 1)
|