Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -74,11 +74,11 @@ with gr.Blocks() as interface:
|
|
74 |
with gr.Tab("Leaderboard"):
|
75 |
gr.Markdown("# LLM Model Leaderboard\nTrack performance across different games!")
|
76 |
|
77 |
-
leaderboard_table = gr.Dataframe(label="Leaderboard"
|
78 |
|
79 |
with gr.Row():
|
80 |
model_dropdown = gr.Dropdown(choices=llm_models, label="Select LLM Model")
|
81 |
-
details_output = gr.
|
82 |
|
83 |
def update_leaderboard():
|
84 |
"""Updates the leaderboard table."""
|
@@ -89,8 +89,8 @@ with gr.Blocks() as interface:
|
|
89 |
return get_model_details(model_name)
|
90 |
|
91 |
update_leaderboard_button = gr.Button("Refresh Leaderboard")
|
92 |
-
update_leaderboard_button.click(update_leaderboard, inputs=[], outputs=leaderboard_table)
|
93 |
|
94 |
-
model_dropdown.change(update_details, inputs=[model_dropdown], outputs=details_output)
|
95 |
|
96 |
interface.launch()
|
|
|
74 |
with gr.Tab("Leaderboard"):
|
75 |
gr.Markdown("# LLM Model Leaderboard\nTrack performance across different games!")
|
76 |
|
77 |
+
leaderboard_table = gr.Dataframe(value=calculate_leaderboard(), label="Leaderboard")
|
78 |
|
79 |
with gr.Row():
|
80 |
model_dropdown = gr.Dropdown(choices=llm_models, label="Select LLM Model")
|
81 |
+
details_output = gr.Textbox(label="Model Performance Details", interactive=False)
|
82 |
|
83 |
def update_leaderboard():
|
84 |
"""Updates the leaderboard table."""
|
|
|
89 |
return get_model_details(model_name)
|
90 |
|
91 |
update_leaderboard_button = gr.Button("Refresh Leaderboard")
|
92 |
+
update_leaderboard_button.click(fn=update_leaderboard, inputs=[], outputs=[leaderboard_table])
|
93 |
|
94 |
+
model_dropdown.change(fn=update_details, inputs=[model_dropdown], outputs=[details_output])
|
95 |
|
96 |
interface.launch()
|