Spaces:
Sleeping
Sleeping
Upload 7 files
Browse files- app.py +3 -3
- requirements.txt +1 -1
- src/assets/text_content.py +2 -2
- src/leaderboard_utils.py +3 -2
- src/trend_utils.py +3 -3
- src/version_utils.py +1 -1
app.py
CHANGED
@@ -84,7 +84,7 @@ with hf_app:
|
|
84 |
elem_id="text-leaderboard-table",
|
85 |
interactive=False,
|
86 |
visible=True,
|
87 |
-
height=dataframe_height
|
88 |
)
|
89 |
|
90 |
# Show information about the clemscore and last updated date below the table
|
@@ -124,7 +124,7 @@ with hf_app:
|
|
124 |
elem_id="mm-leaderboard-table",
|
125 |
interactive=False,
|
126 |
visible=True,
|
127 |
-
height=dataframe_height
|
128 |
)
|
129 |
|
130 |
# Show information about the clemscore and last updated date below the table
|
@@ -407,7 +407,7 @@ with hf_app:
|
|
407 |
elem_id="version-leaderboard-table",
|
408 |
interactive=False,
|
409 |
visible=True,
|
410 |
-
height=dataframe_height
|
411 |
)
|
412 |
|
413 |
dummy_prev_table = gr.Dataframe(
|
|
|
84 |
elem_id="text-leaderboard-table",
|
85 |
interactive=False,
|
86 |
visible=True,
|
87 |
+
# height=dataframe_height
|
88 |
)
|
89 |
|
90 |
# Show information about the clemscore and last updated date below the table
|
|
|
124 |
elem_id="mm-leaderboard-table",
|
125 |
interactive=False,
|
126 |
visible=True,
|
127 |
+
# height=dataframe_height
|
128 |
)
|
129 |
|
130 |
# Show information about the clemscore and last updated date below the table
|
|
|
407 |
elem_id="version-leaderboard-table",
|
408 |
interactive=False,
|
409 |
visible=True,
|
410 |
+
# height=dataframe_height
|
411 |
)
|
412 |
|
413 |
dummy_prev_table = gr.Dataframe(
|
requirements.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
gradio==
|
2 |
pandas==2.2.2
|
3 |
plotly==5.18.0
|
4 |
apscheduler==3.10.4
|
|
|
1 |
+
gradio==5.8.0
|
2 |
pandas==2.2.2
|
3 |
plotly==5.18.0
|
4 |
apscheduler==3.10.4
|
src/assets/text_content.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
TITLE = """<h1 align="center" id="space-title"> 🏆 CLEM Leaderboard</h1>"""
|
2 |
|
3 |
-
REPO = "https://raw.githubusercontent.com/
|
4 |
-
REGISTRY_URL = "https://raw.githubusercontent.com/
|
5 |
|
6 |
HF_REPO = "colab-potsdam/clem-leaderboard"
|
7 |
|
|
|
1 |
TITLE = """<h1 align="center" id="space-title"> 🏆 CLEM Leaderboard</h1>"""
|
2 |
|
3 |
+
REPO = "https://raw.githubusercontent.com/kushal-10/clembench-runs/main/"
|
4 |
+
REGISTRY_URL = "https://raw.githubusercontent.com/clp-research/clembench/refs/heads/main/backends/model_registry.json"
|
5 |
|
6 |
HF_REPO = "colab-potsdam/clem-leaderboard"
|
7 |
|
src/leaderboard_utils.py
CHANGED
@@ -10,6 +10,7 @@ from src.assets.text_content import REPO
|
|
10 |
def get_github_data():
|
11 |
"""
|
12 |
Read and process data from CSV files hosted on GitHub. - https://github.com/clembench/clembench-runs
|
|
|
13 |
|
14 |
Returns:
|
15 |
github_data (dict): Dictionary containing:
|
@@ -60,7 +61,7 @@ def get_github_data():
|
|
60 |
text_dfs.append(df)
|
61 |
if text_flag:
|
62 |
text_flag = False
|
63 |
-
text_date = next(ver['
|
64 |
text_date = datetime.strptime(text_date, "%Y-%m-%d").strftime("%d %b %Y")
|
65 |
|
66 |
else:
|
@@ -77,7 +78,7 @@ def get_github_data():
|
|
77 |
mm_dfs.append(df)
|
78 |
if mm_flag:
|
79 |
mm_flag = False
|
80 |
-
mm_date = next(ver['
|
81 |
mm_date = datetime.strptime(mm_date, "%Y-%m-%d").strftime("%d %b %Y")
|
82 |
|
83 |
|
|
|
10 |
def get_github_data():
|
11 |
"""
|
12 |
Read and process data from CSV files hosted on GitHub. - https://github.com/clembench/clembench-runs
|
13 |
+
Set the path in src/assets/text_content/REPO
|
14 |
|
15 |
Returns:
|
16 |
github_data (dict): Dictionary containing:
|
|
|
61 |
text_dfs.append(df)
|
62 |
if text_flag:
|
63 |
text_flag = False
|
64 |
+
text_date = next(ver['last_updated'] for ver in versions if ver['version'] == version)
|
65 |
text_date = datetime.strptime(text_date, "%Y-%m-%d").strftime("%d %b %Y")
|
66 |
|
67 |
else:
|
|
|
78 |
mm_dfs.append(df)
|
79 |
if mm_flag:
|
80 |
mm_flag = False
|
81 |
+
mm_date = next(ver['last_updated'] for ver in versions if ver['version'] == version)
|
82 |
mm_date = datetime.strptime(mm_date, "%Y-%m-%d").strftime("%d %b %Y")
|
83 |
|
84 |
|
src/trend_utils.py
CHANGED
@@ -346,7 +346,7 @@ def get_final_trend_plot(benchmark: str = "Text", mobile_view: bool = False) ->
|
|
346 |
benchmark_ticks = {}
|
347 |
for ver in versions:
|
348 |
if 'multimodal' not in ver['version']: # Skip MM specific benchmark dates
|
349 |
-
benchmark_ticks[pd.to_datetime(ver['
|
350 |
fig = get_plot(text_result_df, start_date=START_DATE, end_date=datetime.now().strftime('%Y-%m-%d'), benchmark_ticks=benchmark_ticks, **plot_kwargs)
|
351 |
else:
|
352 |
mm_dfs = get_github_data()['multimodal']
|
@@ -358,8 +358,8 @@ def get_final_trend_plot(benchmark: str = "Text", mobile_view: bool = False) ->
|
|
358 |
for ver in versions:
|
359 |
if 'multimodal' in ver['version']:
|
360 |
ver['version'] = ver['version'].replace('_multimodal', '')
|
361 |
-
if date_difference(ver['
|
362 |
-
benchmark_ticks[pd.to_datetime(ver['
|
363 |
fig = get_plot(df, start_date=START_DATE, end_date=datetime.now().strftime('%Y-%m-%d'), benchmark_ticks=benchmark_ticks, **plot_kwargs)
|
364 |
|
365 |
return fig
|
|
|
346 |
benchmark_ticks = {}
|
347 |
for ver in versions:
|
348 |
if 'multimodal' not in ver['version']: # Skip MM specific benchmark dates
|
349 |
+
benchmark_ticks[pd.to_datetime(ver['release_date'])] = ver['version']
|
350 |
fig = get_plot(text_result_df, start_date=START_DATE, end_date=datetime.now().strftime('%Y-%m-%d'), benchmark_ticks=benchmark_ticks, **plot_kwargs)
|
351 |
else:
|
352 |
mm_dfs = get_github_data()['multimodal']
|
|
|
358 |
for ver in versions:
|
359 |
if 'multimodal' in ver['version']:
|
360 |
ver['version'] = ver['version'].replace('_multimodal', '')
|
361 |
+
if date_difference(ver['release_date'], '2024-07-15') >= 0:
|
362 |
+
benchmark_ticks[pd.to_datetime(ver['release_date'])] = ver['version'] ## MM benchmark dates considered after v1.6 (incl.)
|
363 |
fig = get_plot(df, start_date=START_DATE, end_date=datetime.now().strftime('%Y-%m-%d'), benchmark_ticks=benchmark_ticks, **plot_kwargs)
|
364 |
|
365 |
return fig
|
src/version_utils.py
CHANGED
@@ -40,7 +40,7 @@ def get_versions_data():
|
|
40 |
# Get Last updated date of the latest version
|
41 |
latest_version = version_names[0]
|
42 |
latest_date = next(
|
43 |
-
ver['
|
44 |
)
|
45 |
formatted_date = datetime.strptime(latest_date, "%Y-%m-%d").strftime("%d %b %Y")
|
46 |
|
|
|
40 |
# Get Last updated date of the latest version
|
41 |
latest_version = version_names[0]
|
42 |
latest_date = next(
|
43 |
+
ver['last_updated'] for ver in versions if ver['version'] == latest_version
|
44 |
)
|
45 |
formatted_date = datetime.strptime(latest_date, "%Y-%m-%d").strftime("%d %b %Y")
|
46 |
|