Spaces:
Sleeping
Sleeping
Fixed rows names
Browse files
app.py
CHANGED
@@ -53,6 +53,10 @@ def calculate_leaderboard():
|
|
53 |
# Format as percentage string
|
54 |
leaderboard_df.loc[llm, game] = f"{wins:.1f}% W / {ties:.1f}% T / {losses:.1f}% L"
|
55 |
|
|
|
|
|
|
|
|
|
56 |
return leaderboard_df
|
57 |
|
58 |
|
@@ -77,6 +81,8 @@ with gr.Blocks() as interface:
|
|
77 |
with gr.Tab("Game Arena"):
|
78 |
gr.Markdown("# LLM Game Arena\nPlay against LLMs or other players in classic games!")
|
79 |
|
|
|
|
|
80 |
with gr.Tab("Leaderboard"):
|
81 |
gr.Markdown("# LLM Model Leaderboard\nTrack performance across different games!")
|
82 |
|
|
|
53 |
# Format as percentage string
|
54 |
leaderboard_df.loc[llm, game] = f"{wins:.1f}% W / {ties:.1f}% T / {losses:.1f}% L"
|
55 |
|
56 |
+
# Ensure LLM names appear in the first column
|
57 |
+
leaderboard_df = leaderboard_df.reset_index()
|
58 |
+
leaderboard_df.rename(columns={"index": "LLM Model"}, inplace=True)
|
59 |
+
|
60 |
return leaderboard_df
|
61 |
|
62 |
|
|
|
81 |
with gr.Tab("Game Arena"):
|
82 |
gr.Markdown("# LLM Game Arena\nPlay against LLMs or other players in classic games!")
|
83 |
|
84 |
+
# (Game selection and play functionality remains unchanged)
|
85 |
+
|
86 |
with gr.Tab("Leaderboard"):
|
87 |
gr.Markdown("# LLM Model Leaderboard\nTrack performance across different games!")
|
88 |
|