Spaces:
Running
Running
[email protected]
commited on
Commit
·
0cbc3d8
1
Parent(s):
e83e5e0
update
Browse files
app.py
CHANGED
@@ -4,6 +4,7 @@ import pandas as pd
|
|
4 |
from apscheduler.schedulers.background import BackgroundScheduler
|
5 |
from huggingface_hub import snapshot_download
|
6 |
import plotly.graph_objects as go
|
|
|
7 |
from src.about import (
|
8 |
CITATION_BUTTON_LABEL,
|
9 |
CITATION_BUTTON_TEXT,
|
@@ -68,6 +69,19 @@ ASSET_LEADERBOARD_DF = get_leaderboard_df(EVAL_RESULTS_PATH, EVAL_REQUESTS_PATH,
|
|
68 |
) = get_evaluation_queue_df(EVAL_REQUESTS_PATH, EVAL_COLS)
|
69 |
|
70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
def init_perf_plot(df):
|
72 |
df = df.copy()
|
73 |
params_col = '#Params (B)'
|
@@ -146,7 +160,8 @@ with demo:
|
|
146 |
# gr.Markdown(LLM_BENCHMARKS_TEXT, elem_classes="markdown-text")
|
147 |
with gr.Row():
|
148 |
perf_plot = gr.components.Plot(
|
149 |
-
value=init_perf_plot(LEADERBOARD_DF),
|
|
|
150 |
elem_id="bs1-plot",
|
151 |
show_label=False,
|
152 |
)
|
|
|
4 |
from apscheduler.schedulers.background import BackgroundScheduler
|
5 |
from huggingface_hub import snapshot_download
|
6 |
import plotly.graph_objects as go
|
7 |
+
import plotly.express as px
|
8 |
from src.about import (
|
9 |
CITATION_BUTTON_LABEL,
|
10 |
CITATION_BUTTON_TEXT,
|
|
|
69 |
) = get_evaluation_queue_df(EVAL_REQUESTS_PATH, EVAL_COLS)
|
70 |
|
71 |
|
72 |
+
def init_asset_plot(df):
|
73 |
+
acc_col = 'Average ⬆️'
|
74 |
+
df = df.sort_values(acc_col).tail(4)
|
75 |
+
fig = px.line_polar(df, r='r', theta='theta', line_close=True)
|
76 |
+
fig.update_traces(fill='toself')
|
77 |
+
fig.update_layout(
|
78 |
+
autosize=False,
|
79 |
+
width=650,
|
80 |
+
height=600,
|
81 |
+
title=f"Accuracy per Asset"
|
82 |
+
)
|
83 |
+
return fig
|
84 |
+
|
85 |
def init_perf_plot(df):
|
86 |
df = df.copy()
|
87 |
params_col = '#Params (B)'
|
|
|
160 |
# gr.Markdown(LLM_BENCHMARKS_TEXT, elem_classes="markdown-text")
|
161 |
with gr.Row():
|
162 |
perf_plot = gr.components.Plot(
|
163 |
+
# value=init_perf_plot(LEADERBOARD_DF),
|
164 |
+
value=init_asset_plot(ASSET_LEADERBOARD_DF)
|
165 |
elem_id="bs1-plot",
|
166 |
show_label=False,
|
167 |
)
|