Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
File size: 2,531 Bytes
a0387d8 cbde346 a0387d8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
import gradio as gr
def get_version_dropdown():
return gr.Dropdown(
choices=["AIR-Bench_24.04", ],
value="AIR-Bench_24.04",
label="Select the version of AIR-Bench",
interactive=True
)
def get_search_bar():
return gr.Textbox(
placeholder=" 🔍 Search for retrieval methods (separate multiple queries with `;`) and press ENTER...",
show_label=False,
# elem_id="search-bar",
info="Search the retrieval methods"
)
def get_reranking_dropdown(model_list):
return gr.Dropdown(
choices=model_list,
label="Select the reranking models",
# elem_id="reranking-select",
interactive=True,
multiselect=True
)
def get_noreranking_dropdown():
return gr.Dropdown(
choices=["NoReranker",],
value=["NoReranker",],
interactive=False,
multiselect=True,
visible=False
)
def get_noreranker_button():
return gr.Button(
value="Only show results without ranking models",
)
def get_metric_dropdown(metric_list, default_metrics):
return gr.Dropdown(
choices=metric_list,
value=default_metrics,
label="Select the metric",
interactive=True,
# elem_id="metric-select-long-doc",
)
def get_domain_dropdown(domain_list, default_domains):
return gr.CheckboxGroup(
choices=domain_list,
value=default_domains,
label="Select the domains",
# elem_id="domain-column-select",
interactive=True,
)
def get_language_dropdown(language_list, default_languages):
return gr.Dropdown(
choices=language_list,
value=language_list,
label="Select the languages",
# elem_id="language-column-select",
multiselect=True,
interactive=True
)
def get_anonymous_checkbox():
return gr.Checkbox(
label="Show anonymous submissions",
value=False,
info="The anonymous submissions might have invalid model information."
)
def get_revision_and_ts_checkbox():
return gr.Checkbox(
label="Show submission details",
value=False,
info="Show the revision and timestamp information of submissions"
)
def get_leaderboard_table(df, datatype, visible=True):
return gr.components.Dataframe(
value=df,
datatype=datatype,
elem_id="leaderboard-table",
interactive=False,
visible=visible,
)
|