Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
File size: 1,887 Bytes
003d870 be01527 003d870 be01527 dd8f702 9e5c72d 003d870 bc6519e be01527 003d870 879d307 be01527 003d870 2cea891 be01527 003d870 be01527 dd8f702 003d870 06a23cd be01527 2cea891 be01527 003d870 dd8f702 003d870 be01527 003d870 bc6519e be01527 003d870 be01527 003d870 be01527 8ff2460 06a23cd |
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 |
from utils import *
global data_component
def update_table(query):
df = get_df()
filtered_df = search_models(df, query)
return filtered_df
with gr.Blocks() as block:
gr.Markdown(
LEADERBOARD_INTRODUCTION
)
with gr.Tabs(elem_classes="tab-buttons") as tabs:
# Table 1
with gr.TabItem("π MMLU-Pro", elem_id="qa-tab-table1", id=1):
with gr.Row():
with gr.Accordion("Citation", open=False):
citation_button = gr.Textbox(
value=CITATION_BUTTON_TEXT,
label=CITATION_BUTTON_LABEL,
elem_id="citation-button",
lines=10,
)
gr.Markdown(
TABLE_INTRODUCTION
)
search_bar = gr.Textbox(
placeholder="Search models...",
show_label=False,
elem_id="search-bar"
)
data_component = gr.components.Dataframe(
value=get_df(),
headers=COLUMN_NAMES,
type="pandas",
datatype=DATA_TITLE_TYPE,
interactive=False,
visible=True,
height=1000
)
refresh_button = gr.Button("Refresh")
search_bar.change(fn=update_table, inputs=[search_bar], outputs=data_component)
refresh_button.click(fn=refresh_data, outputs=data_component)
# table 2
with gr.TabItem("π About", elem_id="qa-tab-table2", id=2):
gr.Markdown(LEADERBOARD_INFO, elem_classes="markdown-text")
# table 3
with gr.TabItem("π Submit here! ", elem_id="submit-tab", id=3):
with gr.Row():
gr.Markdown(SUBMIT_INTRODUCTION, elem_classes="markdown-text")
block.launch(share=True)
|