Spaces:
Running
Running
Try
Browse files
app.py
CHANGED
@@ -122,12 +122,10 @@ def fetch_model_detail(submission_id):
|
|
122 |
)
|
123 |
|
124 |
def change_leaderboard_category(category):
|
125 |
-
return (
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
datatype="markdown",
|
130 |
-
),
|
131 |
)
|
132 |
|
133 |
def show_modal():
|
@@ -233,8 +231,8 @@ with gr.Blocks(theme=gr.themes.Soft(text_size=text_md), css=custom_css) as main:
|
|
233 |
|
234 |
category_of_tasks.change(
|
235 |
fn=change_leaderboard_category,
|
236 |
-
inputs=
|
237 |
-
outputs=
|
238 |
)
|
239 |
|
240 |
with gr.Tab('Model details'):
|
|
|
122 |
)
|
123 |
|
124 |
def change_leaderboard_category(category):
|
125 |
+
return gr.update(
|
126 |
+
value=leaderboard_server.get_leaderboard(category=category),
|
127 |
+
visible=True,
|
128 |
+
datatype="markdown",
|
|
|
|
|
129 |
)
|
130 |
|
131 |
def show_modal():
|
|
|
231 |
|
232 |
category_of_tasks.change(
|
233 |
fn=change_leaderboard_category,
|
234 |
+
inputs=category_of_tasks,
|
235 |
+
outputs=results_table,
|
236 |
)
|
237 |
|
238 |
with gr.Tab('Model details'):
|
server.py
CHANGED
@@ -94,7 +94,6 @@ class LeaderboardServer:
|
|
94 |
def get_leaderboard(self, tournament_results=None, category=None):
|
95 |
tournament_results = tournament_results if tournament_results else self.tournament_results
|
96 |
category = category if category else self.tasks_category_overall
|
97 |
-
category = list(self.tasks_categories)[0]
|
98 |
|
99 |
if len(tournament_results) == 0:
|
100 |
return pd.DataFrame(columns=['No submissions yet'])
|
|
|
94 |
def get_leaderboard(self, tournament_results=None, category=None):
|
95 |
tournament_results = tournament_results if tournament_results else self.tournament_results
|
96 |
category = category if category else self.tasks_category_overall
|
|
|
97 |
|
98 |
if len(tournament_results) == 0:
|
99 |
return pd.DataFrame(columns=['No submissions yet'])
|