MMLU-Pro / app.py
wenhu's picture
Update app.py
2cea891 verified
raw
history blame
1.51 kB
from utils import *
global data_component
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
)
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")
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)