Spaces:
Sleeping
Sleeping
kz209
commited on
Commit
Β·
214ffa6
1
Parent(s):
5f3eeaf
update
Browse files- pages/leaderboard.py +7 -3
pages/leaderboard.py
CHANGED
@@ -24,6 +24,10 @@ df = pd.DataFrame(data)
|
|
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 |
# Update ranks based on new sorting
|
29 |
sorted_df['Rank'] = range(1, len(sorted_df) + 1)
|
@@ -39,7 +43,7 @@ def update_leaderboard(sort_by):
|
|
39 |
return html
|
40 |
|
41 |
def create_leaderboard():
|
42 |
-
with gr.Blocks(
|
43 |
gr.Markdown("# π Summarization Arena Leaderboard")
|
44 |
|
45 |
with gr.Row():
|
@@ -47,11 +51,11 @@ def create_leaderboard():
|
|
47 |
|
48 |
gr.Markdown("Welcome to our open platform for evaluating LLM summarization capabilities. We use the DATASET_NAME_PLACEHOLDER dataset to generate summaries with MODEL_NAME_PLACEHOLDER. These summaries are then evaluated by STRONGER_MODEL_NAME_PLACEHOLDER using the METRIC1_PLACEHOLDER and METRIC2_PLACEHOLDER metrics")
|
49 |
|
50 |
-
sort_by = gr.Dropdown(list(df.columns), label="Sort by", value="
|
51 |
|
52 |
gr.Markdown("**Performance**\n\n**methods**: 5, **questions**: 15")
|
53 |
|
54 |
-
leaderboard = gr.HTML(update_leaderboard("
|
55 |
|
56 |
sort_by.change(update_leaderboard, inputs=[sort_by], outputs=[leaderboard])
|
57 |
|
|
|
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)
|
|
|
43 |
return html
|
44 |
|
45 |
def create_leaderboard():
|
46 |
+
with gr.Blocks(css=custom_css) as demo:
|
47 |
gr.Markdown("# π Summarization Arena Leaderboard")
|
48 |
|
49 |
with gr.Row():
|
|
|
51 |
|
52 |
gr.Markdown("Welcome to our open platform for evaluating LLM summarization capabilities. We use the DATASET_NAME_PLACEHOLDER dataset to generate summaries with MODEL_NAME_PLACEHOLDER. These summaries are then evaluated by STRONGER_MODEL_NAME_PLACEHOLDER using the METRIC1_PLACEHOLDER and METRIC2_PLACEHOLDER metrics")
|
53 |
|
54 |
+
sort_by = gr.Dropdown(list(df.columns), label="Sort by", value="Rouge Score")
|
55 |
|
56 |
gr.Markdown("**Performance**\n\n**methods**: 5, **questions**: 15")
|
57 |
|
58 |
+
leaderboard = gr.HTML(update_leaderboard("Rouge Score"), elem_id="leaderboard")
|
59 |
|
60 |
sort_by.change(update_leaderboard, inputs=[sort_by], outputs=[leaderboard])
|
61 |
|