Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Clémentine
commited on
Commit
•
e5438c2
1
Parent(s):
65687fa
added judge as selection, passed tags to lower at extraction
Browse files- app.py +15 -9
- src/leaderboards/get_from_hub.py +1 -1
app.py
CHANGED
@@ -13,7 +13,7 @@ def restart_space():
|
|
13 |
|
14 |
LEADERBOARDS_TO_INFO, INFO_TO_LEADERBOARDS = get_leaderboard_info()
|
15 |
|
16 |
-
def update_leaderboards(show_all, modality_tags, submission_tags, test_set_tags, evaluation_tags, language_tags):
|
17 |
spaces_of_interest = []
|
18 |
if show_all:
|
19 |
spaces_of_interest = INFO_TO_LEADERBOARDS["all"]
|
@@ -28,6 +28,8 @@ def update_leaderboards(show_all, modality_tags, submission_tags, test_set_tags,
|
|
28 |
spaces_of_interest.extend(INFO_TO_LEADERBOARDS["modality"][tag.lower()])
|
29 |
for tag in language_tags:
|
30 |
spaces_of_interest.extend(INFO_TO_LEADERBOARDS["language"][tag.lower()])
|
|
|
|
|
31 |
|
32 |
return "- " + "\n - ".join([
|
33 |
make_clickable(space) +
|
@@ -47,11 +49,6 @@ with demo:
|
|
47 |
gr.Markdown("Let's look for leaderboards relevant for you! Select the categories of your choice")
|
48 |
with gr.Row():
|
49 |
with gr.Column():
|
50 |
-
show_all = gr.Checkbox(
|
51 |
-
value=False,
|
52 |
-
label="Show all leaderboards"
|
53 |
-
)
|
54 |
-
|
55 |
modality_tags = gr.CheckboxGroup(
|
56 |
choices=[tag.name for tag in Modality],
|
57 |
value=[],
|
@@ -67,7 +64,16 @@ with demo:
|
|
67 |
value=[],
|
68 |
label="Test set status"
|
69 |
)
|
|
|
|
|
|
|
|
|
|
|
70 |
with gr.Column():
|
|
|
|
|
|
|
|
|
71 |
evaluation_tags = gr.CheckboxGroup(
|
72 |
choices=[tag.name for tag in EvaluationCategory],
|
73 |
value=[],
|
@@ -83,15 +89,15 @@ with demo:
|
|
83 |
value="",
|
84 |
)
|
85 |
|
86 |
-
for selector in [modality_tags, submission_tags, test_set_tags, evaluation_tags, language_tags]:
|
87 |
selector.change(
|
88 |
lambda _: False,
|
89 |
outputs=show_all
|
90 |
)
|
91 |
-
for selector in [show_all, modality_tags, submission_tags, test_set_tags, evaluation_tags, language_tags]:
|
92 |
selector.change(
|
93 |
update_leaderboards,
|
94 |
-
[show_all, modality_tags, submission_tags, test_set_tags, evaluation_tags, language_tags],
|
95 |
leaderboards,
|
96 |
queue=True,
|
97 |
)
|
|
|
13 |
|
14 |
LEADERBOARDS_TO_INFO, INFO_TO_LEADERBOARDS = get_leaderboard_info()
|
15 |
|
16 |
+
def update_leaderboards(show_all, modality_tags, submission_tags, test_set_tags, evaluation_tags, language_tags, judge_tags):
|
17 |
spaces_of_interest = []
|
18 |
if show_all:
|
19 |
spaces_of_interest = INFO_TO_LEADERBOARDS["all"]
|
|
|
28 |
spaces_of_interest.extend(INFO_TO_LEADERBOARDS["modality"][tag.lower()])
|
29 |
for tag in language_tags:
|
30 |
spaces_of_interest.extend(INFO_TO_LEADERBOARDS["language"][tag.lower()])
|
31 |
+
for tag in judge_tags:
|
32 |
+
spaces_of_interest.extend(INFO_TO_LEADERBOARDS["judge"][tag.lower()])
|
33 |
|
34 |
return "- " + "\n - ".join([
|
35 |
make_clickable(space) +
|
|
|
49 |
gr.Markdown("Let's look for leaderboards relevant for you! Select the categories of your choice")
|
50 |
with gr.Row():
|
51 |
with gr.Column():
|
|
|
|
|
|
|
|
|
|
|
52 |
modality_tags = gr.CheckboxGroup(
|
53 |
choices=[tag.name for tag in Modality],
|
54 |
value=[],
|
|
|
64 |
value=[],
|
65 |
label="Test set status"
|
66 |
)
|
67 |
+
judge_tags = gr.CheckboxGroup(
|
68 |
+
choices=[tag.name for tag in Judge],
|
69 |
+
value=[],
|
70 |
+
label="Judge used for the evaluation"
|
71 |
+
)
|
72 |
with gr.Column():
|
73 |
+
show_all = gr.Checkbox(
|
74 |
+
value=False,
|
75 |
+
label="Show all leaderboards"
|
76 |
+
)
|
77 |
evaluation_tags = gr.CheckboxGroup(
|
78 |
choices=[tag.name for tag in EvaluationCategory],
|
79 |
value=[],
|
|
|
89 |
value="",
|
90 |
)
|
91 |
|
92 |
+
for selector in [modality_tags, submission_tags, test_set_tags, evaluation_tags, language_tags, judge_tags]:
|
93 |
selector.change(
|
94 |
lambda _: False,
|
95 |
outputs=show_all
|
96 |
)
|
97 |
+
for selector in [show_all, modality_tags, submission_tags, test_set_tags, evaluation_tags, language_tags, judge_tags]:
|
98 |
selector.change(
|
99 |
update_leaderboards,
|
100 |
+
[show_all, modality_tags, submission_tags, test_set_tags, evaluation_tags, language_tags, judge_tags],
|
101 |
leaderboards,
|
102 |
queue=True,
|
103 |
)
|
src/leaderboards/get_from_hub.py
CHANGED
@@ -20,7 +20,7 @@ def group_all_tags(input_tags: list[str]) -> dict:
|
|
20 |
|
21 |
try:
|
22 |
category, value = tag.split(":")
|
23 |
-
output_tags[category].append(value)
|
24 |
except ValueError:
|
25 |
continue
|
26 |
|
|
|
20 |
|
21 |
try:
|
22 |
category, value = tag.split(":")
|
23 |
+
output_tags[category].append(value.lower())
|
24 |
except ValueError:
|
25 |
continue
|
26 |
|