Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -175,7 +175,7 @@ def build_basic_stats_tab():
|
|
175 |
md4 = gr.Markdown(empty)
|
176 |
return [md0, plot_1, md1, md2, md3, md4]
|
177 |
|
178 |
-
def get_full_table(
|
179 |
values = []
|
180 |
for i in range(len(model_table_df)):
|
181 |
row = []
|
@@ -183,11 +183,7 @@ def get_full_table(arena_df, model_table_df):
|
|
183 |
model_name = model_table_df.iloc[i]["Model"]
|
184 |
# model display name
|
185 |
row.append(model_name)
|
186 |
-
|
187 |
-
idx = arena_df.index.get_loc(model_key)
|
188 |
-
row.append(round(arena_df.iloc[idx]["rating"]))
|
189 |
-
else:
|
190 |
-
row.append(np.nan)
|
191 |
row.append(model_table_df.iloc[i]["MT-bench (score)"])
|
192 |
row.append(model_table_df.iloc[i]["MMLU"])
|
193 |
# Organization
|
@@ -313,9 +309,49 @@ def build_leaderboard_tab(elo_results_file, leaderboard_table_file, show_plot=Fa
|
|
313 |
with gr.Tabs() as tabs:
|
314 |
# arena table
|
315 |
arena_table_vals = get_arena_table(arena_df, model_table_df)
|
316 |
-
with gr.Tab("Arena Elo", id=0):
|
317 |
-
|
318 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
319 |
with gr.Row():
|
320 |
with gr.Column(scale=2):
|
321 |
category_dropdown = gr.Dropdown(choices=list(arena_dfs.keys()), label="Category", value="Overall")
|
@@ -323,40 +359,7 @@ def build_leaderboard_tab(elo_results_file, leaderboard_table_file, show_plot=Fa
|
|
323 |
with gr.Column(scale=4, variant="panel"):
|
324 |
category_deets = gr.Markdown(default_category_details, elem_id="category_deets")
|
325 |
|
326 |
-
|
327 |
-
headers=[
|
328 |
-
"Rank",
|
329 |
-
"π€ Model",
|
330 |
-
"β Arena Elo",
|
331 |
-
"Organization",
|
332 |
-
"License",
|
333 |
-
],
|
334 |
-
datatype=[
|
335 |
-
"number",
|
336 |
-
"markdown",
|
337 |
-
"number",
|
338 |
-
"str",
|
339 |
-
"str",
|
340 |
-
],
|
341 |
-
value=arena_table_vals,
|
342 |
-
elem_id="arena_leaderboard_dataframe",
|
343 |
-
height=700,
|
344 |
-
column_widths=[70, 190, 110, 160, 150, 140],
|
345 |
-
wrap=True,
|
346 |
-
)
|
347 |
-
|
348 |
-
gr.Markdown(
|
349 |
-
f"""Note: .
|
350 |
-
""",
|
351 |
-
elem_id="leaderboard_markdown"
|
352 |
-
)
|
353 |
-
|
354 |
-
leader_component_values[:] = [default_md]
|
355 |
-
|
356 |
-
with gr.Tab("Full Leaderboard", id=1):
|
357 |
-
md = make_full_leaderboard_md(elo_results)
|
358 |
-
gr.Markdown(md, elem_id="leaderboard_markdown")
|
359 |
-
full_table_vals = get_full_table(arena_df, model_table_df)
|
360 |
gr.Dataframe(
|
361 |
headers=[
|
362 |
"π€ Model",
|
@@ -375,7 +378,7 @@ def build_leaderboard_tab(elo_results_file, leaderboard_table_file, show_plot=Fa
|
|
375 |
)
|
376 |
if not show_plot:
|
377 |
gr.Markdown(
|
378 |
-
""" ##
|
379 |
""",
|
380 |
elem_id="leaderboard_markdown",
|
381 |
)
|
|
|
175 |
md4 = gr.Markdown(empty)
|
176 |
return [md0, plot_1, md1, md2, md3, md4]
|
177 |
|
178 |
+
def get_full_table(model_table_df):
|
179 |
values = []
|
180 |
for i in range(len(model_table_df)):
|
181 |
row = []
|
|
|
183 |
model_name = model_table_df.iloc[i]["Model"]
|
184 |
# model display name
|
185 |
row.append(model_name)
|
186 |
+
row.append(np.nan)
|
|
|
|
|
|
|
|
|
187 |
row.append(model_table_df.iloc[i]["MT-bench (score)"])
|
188 |
row.append(model_table_df.iloc[i]["MMLU"])
|
189 |
# Organization
|
|
|
309 |
with gr.Tabs() as tabs:
|
310 |
# arena table
|
311 |
arena_table_vals = get_arena_table(arena_df, model_table_df)
|
312 |
+
# with gr.Tab("Arena Elo", id=0):
|
313 |
+
# md = make_arena_leaderboard_md(arena_df)
|
314 |
+
# leaderboard_markdown = gr.Markdown(md, elem_id="leaderboard_markdown")
|
315 |
+
# with gr.Row():
|
316 |
+
# with gr.Column(scale=2):
|
317 |
+
# category_dropdown = gr.Dropdown(choices=list(arena_dfs.keys()), label="Category", value="Overall")
|
318 |
+
# default_category_details = make_category_arena_leaderboard_md(arena_df, arena_df, name="Overall")
|
319 |
+
# with gr.Column(scale=4, variant="panel"):
|
320 |
+
# category_deets = gr.Markdown(default_category_details, elem_id="category_deets")
|
321 |
+
|
322 |
+
# elo_display_df = gr.Dataframe(
|
323 |
+
# headers=[
|
324 |
+
# "Rank",
|
325 |
+
# "π€ Model",
|
326 |
+
# "β Arena Elo",
|
327 |
+
# "Organization",
|
328 |
+
# "License",
|
329 |
+
# ],
|
330 |
+
# datatype=[
|
331 |
+
# "number",
|
332 |
+
# "markdown",
|
333 |
+
# "number",
|
334 |
+
# "str",
|
335 |
+
# "str",
|
336 |
+
# ],
|
337 |
+
# value=arena_table_vals,
|
338 |
+
# elem_id="arena_leaderboard_dataframe",
|
339 |
+
# height=700,
|
340 |
+
# column_widths=[70, 190, 110, 160, 150, 140],
|
341 |
+
# wrap=True,
|
342 |
+
# )
|
343 |
+
|
344 |
+
# gr.Markdown(
|
345 |
+
# f"""Note: .
|
346 |
+
# """,
|
347 |
+
# elem_id="leaderboard_markdown"
|
348 |
+
# )
|
349 |
+
|
350 |
+
# leader_component_values[:] = [default_md]
|
351 |
+
|
352 |
+
with gr.Tab("Full Leaderboard", id=0):
|
353 |
+
md = make_full_leaderboard_md(elo_results)
|
354 |
+
gr.Markdown(md, elem_id="leaderboard_markdown")
|
355 |
with gr.Row():
|
356 |
with gr.Column(scale=2):
|
357 |
category_dropdown = gr.Dropdown(choices=list(arena_dfs.keys()), label="Category", value="Overall")
|
|
|
359 |
with gr.Column(scale=4, variant="panel"):
|
360 |
category_deets = gr.Markdown(default_category_details, elem_id="category_deets")
|
361 |
|
362 |
+
full_table_vals = get_full_table(model_table_df)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
363 |
gr.Dataframe(
|
364 |
headers=[
|
365 |
"π€ Model",
|
|
|
378 |
)
|
379 |
if not show_plot:
|
380 |
gr.Markdown(
|
381 |
+
""" ## Submit your model [here]().
|
382 |
""",
|
383 |
elem_id="leaderboard_markdown",
|
384 |
)
|