Spaces:
Running
Running
Upload 6 files
Browse files- app.py +4 -4
- src/trend_utils.py +4 -6
app.py
CHANGED
@@ -9,7 +9,7 @@ from src.leaderboard_utils import query_search, get_github_data
|
|
9 |
from src.plot_utils import split_models, plotly_plot, get_plot_df, update_open_models, update_closed_models
|
10 |
from src.plot_utils import reset_show_all, reset_show_names, reset_show_legend, reset_mobile_view
|
11 |
from src.version_utils import get_versions_data
|
12 |
-
from src.trend_utils import
|
13 |
|
14 |
"""
|
15 |
CONSTANTS
|
@@ -352,8 +352,8 @@ with hf_app:
|
|
352 |
with gr.Row():
|
353 |
with gr.Column(scale=3):
|
354 |
trend_select = gr.Dropdown(
|
355 |
-
choices=["
|
356 |
-
value="
|
357 |
label="Select Benchmark 🔍",
|
358 |
elem_id="value-select-7",
|
359 |
interactive=True,
|
@@ -368,7 +368,7 @@ with hf_app:
|
|
368 |
)
|
369 |
|
370 |
with gr.Row():
|
371 |
-
trend_plot = gr.Plot(
|
372 |
label="Trend over time")
|
373 |
|
374 |
trend_select.change(
|
|
|
9 |
from src.plot_utils import split_models, plotly_plot, get_plot_df, update_open_models, update_closed_models
|
10 |
from src.plot_utils import reset_show_all, reset_show_names, reset_show_legend, reset_mobile_view
|
11 |
from src.version_utils import get_versions_data
|
12 |
+
from src.trend_utils import get_final_trend_plot
|
13 |
|
14 |
"""
|
15 |
CONSTANTS
|
|
|
352 |
with gr.Row():
|
353 |
with gr.Column(scale=3):
|
354 |
trend_select = gr.Dropdown(
|
355 |
+
choices=["CLEM", "CLEM Multimodal"],
|
356 |
+
value="CLEM",
|
357 |
label="Select Benchmark 🔍",
|
358 |
elem_id="value-select-7",
|
359 |
interactive=True,
|
|
|
368 |
)
|
369 |
|
370 |
with gr.Row():
|
371 |
+
trend_plot = gr.Plot(get_final_trend_plot(),
|
372 |
label="Trend over time")
|
373 |
|
374 |
trend_select.change(
|
src/trend_utils.py
CHANGED
@@ -148,7 +148,6 @@ def get_trend_data(text_dfs: list, model_registry_data: list) -> pd.DataFrame:
|
|
148 |
if dict_obj["parameters"] == "" :
|
149 |
params = "1000B"
|
150 |
est_flag = True
|
151 |
-
print(f"EST PARAMS for {model_name}: {params}")
|
152 |
else:
|
153 |
params = dict_obj['parameters']
|
154 |
est_flag = False
|
@@ -334,8 +333,10 @@ def get_final_trend_plot(benchmark: str = "text", mobile_flag: bool = False) ->
|
|
334 |
for ver in versions:
|
335 |
if 'multimodal' in ver['version']:
|
336 |
ver['version'] = ver['version'].replace('_multimodal', '')
|
337 |
-
|
338 |
-
|
|
|
|
|
339 |
|
340 |
|
341 |
if mobile_flag:
|
@@ -343,8 +344,5 @@ def get_final_trend_plot(benchmark: str = "text", mobile_flag: bool = False) ->
|
|
343 |
for trace in fig.data:
|
344 |
trace.text = [] # Clear text labels
|
345 |
|
346 |
-
# # Show only benchmark ticks
|
347 |
-
# fig.update_xaxes(tickvals=combined_tickvals, ticktext=combined_ticktext) # Show only benchmark ticks
|
348 |
-
# fig.update_layout(width=width, height=height)
|
349 |
|
350 |
return fig
|
|
|
148 |
if dict_obj["parameters"] == "" :
|
149 |
params = "1000B"
|
150 |
est_flag = True
|
|
|
151 |
else:
|
152 |
params = dict_obj['parameters']
|
153 |
est_flag = False
|
|
|
333 |
for ver in versions:
|
334 |
if 'multimodal' in ver['version']:
|
335 |
ver['version'] = ver['version'].replace('_multimodal', '')
|
336 |
+
if date_difference(ver['date'], '2024-07-15') >= 0:
|
337 |
+
benchmark_ticks[pd.to_datetime(ver['date'])] = ver['version']
|
338 |
+
|
339 |
+
fig = get_plot(df, start_date='2023-06-01', end_date=datetime.now().strftime('%Y-%m-%d'), open_diff=-0.5, comm_diff=-6, benchmark_ticks=benchmark_ticks, height=height, width=width)
|
340 |
|
341 |
|
342 |
if mobile_flag:
|
|
|
344 |
for trace in fig.data:
|
345 |
trace.text = [] # Clear text labels
|
346 |
|
|
|
|
|
|
|
347 |
|
348 |
return fig
|