Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
feat: fix the reranker list
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ from src.display.css_html_js import custom_css
|
|
14 |
from src.display.utils import COL_NAME_IS_ANONYMOUS, COL_NAME_REVISION, COL_NAME_TIMESTAMP, COL_NAME_RERANKING_MODEL, COL_NAME_RETRIEVAL_MODEL
|
15 |
from src.envs import API, EVAL_RESULTS_PATH, REPO_ID, RESULTS_REPO, TOKEN
|
16 |
from src.read_evals import get_raw_eval_results, get_leaderboard_df
|
17 |
-
from src.utils import update_metric, upload_file, get_default_cols, submit_results, reset_rank
|
18 |
from src.display.gradio_formatting import get_version_dropdown, get_search_bar, get_reranking_dropdown, \
|
19 |
get_metric_dropdown, get_domain_dropdown, get_language_dropdown, get_anonymous_checkbox, get_revision_and_ts_checkbox, get_leaderboard_table, get_noreranking_dropdown
|
20 |
from src.display.gradio_listener import set_listeners
|
@@ -190,13 +190,14 @@ with demo:
|
|
190 |
queue=True
|
191 |
)
|
192 |
with gr.TabItem("Reranking Only", id=12):
|
|
|
|
|
|
|
193 |
with gr.Row():
|
194 |
with gr.Column(scale=1):
|
195 |
-
selected_rerankings_reranker = get_reranking_dropdown(
|
196 |
with gr.Column(scale=1):
|
197 |
search_bar_reranker = gr.Textbox(show_label=False, visible=False)
|
198 |
-
lb_df_reranker = leaderboard_df_qa[leaderboard_df_qa[COL_NAME_RETRIEVAL_MODEL] == "BM25"]
|
199 |
-
lb_df_reranker = reset_rank(lb_df_reranker)
|
200 |
lb_table_reranker = get_leaderboard_table(lb_df_reranker, types_qa)
|
201 |
hidden_lb_df_reranker = original_df_qa[original_df_qa[COL_NAME_RETRIEVAL_MODEL] == "BM25"]
|
202 |
hidden_lb_df_reranker = reset_rank(hidden_lb_df_reranker)
|
@@ -343,15 +344,16 @@ with demo:
|
|
343 |
queue=True
|
344 |
)
|
345 |
with gr.TabItem("Reranking Only", id=22):
|
|
|
|
|
|
|
|
|
|
|
346 |
with gr.Row():
|
347 |
with gr.Column(scale=1):
|
348 |
-
selected_rerankings_reranker_ldoc = get_reranking_dropdown(
|
349 |
with gr.Column(scale=1):
|
350 |
search_bar_reranker_ldoc = gr.Textbox(show_label=False, visible=False)
|
351 |
-
lb_df_reranker_ldoc = leaderboard_df_long_doc[
|
352 |
-
leaderboard_df_long_doc[COL_NAME_RETRIEVAL_MODEL] == "BM25"
|
353 |
-
]
|
354 |
-
lb_df_reranker_ldoc = reset_rank(lb_df_reranker_ldoc)
|
355 |
lb_table_reranker_ldoc = get_leaderboard_table(lb_df_reranker_ldoc, types_long_doc)
|
356 |
hidden_lb_df_reranker_ldoc = original_df_long_doc[original_df_long_doc[COL_NAME_RETRIEVAL_MODEL] == "BM25"]
|
357 |
hidden_lb_df_reranker_ldoc = reset_rank(hidden_lb_df_reranker_ldoc)
|
|
|
14 |
from src.display.utils import COL_NAME_IS_ANONYMOUS, COL_NAME_REVISION, COL_NAME_TIMESTAMP, COL_NAME_RERANKING_MODEL, COL_NAME_RETRIEVAL_MODEL
|
15 |
from src.envs import API, EVAL_RESULTS_PATH, REPO_ID, RESULTS_REPO, TOKEN
|
16 |
from src.read_evals import get_raw_eval_results, get_leaderboard_df
|
17 |
+
from src.utils import update_metric, upload_file, get_default_cols, submit_results, reset_rank, remove_html
|
18 |
from src.display.gradio_formatting import get_version_dropdown, get_search_bar, get_reranking_dropdown, \
|
19 |
get_metric_dropdown, get_domain_dropdown, get_language_dropdown, get_anonymous_checkbox, get_revision_and_ts_checkbox, get_leaderboard_table, get_noreranking_dropdown
|
20 |
from src.display.gradio_listener import set_listeners
|
|
|
190 |
queue=True
|
191 |
)
|
192 |
with gr.TabItem("Reranking Only", id=12):
|
193 |
+
lb_df_reranker = leaderboard_df_qa[leaderboard_df_qa[COL_NAME_RETRIEVAL_MODEL] == "BM25"]
|
194 |
+
lb_df_reranker = reset_rank(lb_df_reranker)
|
195 |
+
reranking_models_reranker = lb_df_reranker[COL_NAME_RERANKING_MODEL].apply(remove_html).unique().tolist()
|
196 |
with gr.Row():
|
197 |
with gr.Column(scale=1):
|
198 |
+
selected_rerankings_reranker = get_reranking_dropdown(reranking_models_reranker)
|
199 |
with gr.Column(scale=1):
|
200 |
search_bar_reranker = gr.Textbox(show_label=False, visible=False)
|
|
|
|
|
201 |
lb_table_reranker = get_leaderboard_table(lb_df_reranker, types_qa)
|
202 |
hidden_lb_df_reranker = original_df_qa[original_df_qa[COL_NAME_RETRIEVAL_MODEL] == "BM25"]
|
203 |
hidden_lb_df_reranker = reset_rank(hidden_lb_df_reranker)
|
|
|
344 |
queue=True
|
345 |
)
|
346 |
with gr.TabItem("Reranking Only", id=22):
|
347 |
+
lb_df_reranker_ldoc = leaderboard_df_long_doc[
|
348 |
+
leaderboard_df_long_doc[COL_NAME_RETRIEVAL_MODEL] == "BM25"
|
349 |
+
]
|
350 |
+
lb_df_reranker_ldoc = reset_rank(lb_df_reranker_ldoc)
|
351 |
+
reranking_models_reranker_ldoc = lb_df_reranker_ldoc[COL_NAME_RERANKING_MODEL].apply(remove_html).unique().tolist()
|
352 |
with gr.Row():
|
353 |
with gr.Column(scale=1):
|
354 |
+
selected_rerankings_reranker_ldoc = get_reranking_dropdown(reranking_models_reranker_ldoc)
|
355 |
with gr.Column(scale=1):
|
356 |
search_bar_reranker_ldoc = gr.Textbox(show_label=False, visible=False)
|
|
|
|
|
|
|
|
|
357 |
lb_table_reranker_ldoc = get_leaderboard_table(lb_df_reranker_ldoc, types_long_doc)
|
358 |
hidden_lb_df_reranker_ldoc = original_df_long_doc[original_df_long_doc[COL_NAME_RETRIEVAL_MODEL] == "BM25"]
|
359 |
hidden_lb_df_reranker_ldoc = reset_rank(hidden_lb_df_reranker_ldoc)
|