Spaces:
Runtime error
Runtime error
feat: update the intro text
Browse files- app.py +14 -13
- src/about.py +2 -2
app.py
CHANGED
@@ -21,8 +21,6 @@ from utils import update_table, update_metric
|
|
21 |
from src.benchmarks import DOMAIN_COLS_QA, LANG_COLS_QA, metric_list
|
22 |
|
23 |
|
24 |
-
from functools import partial
|
25 |
-
|
26 |
def restart_space():
|
27 |
API.restart_space(repo_id=REPO_ID)
|
28 |
|
@@ -71,15 +69,25 @@ with demo:
|
|
71 |
gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
|
72 |
|
73 |
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
74 |
-
with gr.TabItem("QA", elem_id="
|
75 |
with gr.Row():
|
76 |
with gr.Column():
|
|
|
77 |
with gr.Row():
|
78 |
search_bar = gr.Textbox(
|
79 |
placeholder=" π Search for your model (separate multiple queries with `;`) and press ENTER...",
|
80 |
show_label=False,
|
81 |
elem_id="search-bar",
|
82 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
# select domain
|
84 |
with gr.Row():
|
85 |
selected_domains = gr.CheckboxGroup(
|
@@ -98,7 +106,7 @@ with demo:
|
|
98 |
elem_id="language-column-select",
|
99 |
interactive=True
|
100 |
)
|
101 |
-
# select reranking
|
102 |
reranking_models = list(frozenset([eval_result.reranking_model for eval_result in raw_data_qa]))
|
103 |
with gr.Row():
|
104 |
selected_rerankings = gr.CheckboxGroup(
|
@@ -108,16 +116,7 @@ with demo:
|
|
108 |
elem_id="reranking-select",
|
109 |
interactive=True
|
110 |
)
|
111 |
-
with gr.Column(min_width=320):
|
112 |
-
selected_metric = gr.Dropdown(
|
113 |
-
choices=metric_list,
|
114 |
-
value=metric_list[1],
|
115 |
-
label="Select the metric",
|
116 |
-
interactive=True,
|
117 |
-
elem_id="metric-select",
|
118 |
-
)
|
119 |
|
120 |
-
# reload the leaderboard_df and raw_data when selected_metric is changed
|
121 |
leaderboard_table = gr.components.Dataframe(
|
122 |
value=leaderboard_df,
|
123 |
# headers=shown_columns,
|
@@ -179,6 +178,8 @@ with demo:
|
|
179 |
queue=True
|
180 |
)
|
181 |
|
|
|
|
|
182 |
with gr.TabItem("π About", elem_id="llm-benchmark-tab-table", id=2):
|
183 |
gr.Markdown(LLM_BENCHMARKS_TEXT, elem_classes="markdown-text")
|
184 |
|
|
|
21 |
from src.benchmarks import DOMAIN_COLS_QA, LANG_COLS_QA, metric_list
|
22 |
|
23 |
|
|
|
|
|
24 |
def restart_space():
|
25 |
API.restart_space(repo_id=REPO_ID)
|
26 |
|
|
|
69 |
gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
|
70 |
|
71 |
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
72 |
+
with gr.TabItem("QA", elem_id="qa-benchmark-tab-table", id=0):
|
73 |
with gr.Row():
|
74 |
with gr.Column():
|
75 |
+
# search bar for model name
|
76 |
with gr.Row():
|
77 |
search_bar = gr.Textbox(
|
78 |
placeholder=" π Search for your model (separate multiple queries with `;`) and press ENTER...",
|
79 |
show_label=False,
|
80 |
elem_id="search-bar",
|
81 |
)
|
82 |
+
# select the metric
|
83 |
+
selected_metric = gr.Dropdown(
|
84 |
+
choices=metric_list,
|
85 |
+
value=metric_list[1],
|
86 |
+
label="Select the metric",
|
87 |
+
interactive=True,
|
88 |
+
elem_id="metric-select",
|
89 |
+
)
|
90 |
+
with gr.Column(min_width=320):
|
91 |
# select domain
|
92 |
with gr.Row():
|
93 |
selected_domains = gr.CheckboxGroup(
|
|
|
106 |
elem_id="language-column-select",
|
107 |
interactive=True
|
108 |
)
|
109 |
+
# select reranking model
|
110 |
reranking_models = list(frozenset([eval_result.reranking_model for eval_result in raw_data_qa]))
|
111 |
with gr.Row():
|
112 |
selected_rerankings = gr.CheckboxGroup(
|
|
|
116 |
elem_id="reranking-select",
|
117 |
interactive=True
|
118 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
|
|
|
120 |
leaderboard_table = gr.components.Dataframe(
|
121 |
value=leaderboard_df,
|
122 |
# headers=shown_columns,
|
|
|
178 |
queue=True
|
179 |
)
|
180 |
|
181 |
+
# with gr.TabItem("Long Doc", elem_id="long-doc-benchmark-tab-table", id=1):
|
182 |
+
|
183 |
with gr.TabItem("π About", elem_id="llm-benchmark-tab-table", id=2):
|
184 |
gr.Markdown(LLM_BENCHMARKS_TEXT, elem_classes="markdown-text")
|
185 |
|
src/about.py
CHANGED
@@ -38,11 +38,11 @@ NUM_FEWSHOT = 0 # Change with your few shot
|
|
38 |
|
39 |
|
40 |
# Your leaderboard name
|
41 |
-
TITLE = """<h1 align="center" id="space-title">
|
42 |
|
43 |
# What does your leaderboard evaluate?
|
44 |
INTRODUCTION_TEXT = """
|
45 |
-
|
46 |
"""
|
47 |
|
48 |
# Which evaluations are you running? how can people reproduce what you have?
|
|
|
38 |
|
39 |
|
40 |
# Your leaderboard name
|
41 |
+
TITLE = """<h1 align="center" id="space-title">AIR-Bench</h1>"""
|
42 |
|
43 |
# What does your leaderboard evaluate?
|
44 |
INTRODUCTION_TEXT = """
|
45 |
+
AIR-Bench: Automated Heterogeneous Information Retrieval Benchmark
|
46 |
"""
|
47 |
|
48 |
# Which evaluations are you running? how can people reproduce what you have?
|