yuanshengni's picture
init
6ed5ca9
raw
history blame
3.05 kB
import gradio as gr
import pandas as pd
from utils import *
block = gr.Blocks()
with block:
gr.Markdown(
LEADERBORAD_INTRODUCTION
)
with gr.Tabs(elem_classes="tab-buttons") as tabs:
# Table 0
with gr.TabItem("πŸ“Š TheoremQA", elem_id="theoremqa-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",
)
gr.Markdown(
TABLE_INTRODUCTION
)
gr.components.Dataframe(
value=pd.read_csv(CSV_DIR),
headers=COLUMN_NAMES,
type="pandas",
datatype=DATA_TITILE_TYPE,
interactive=False,
visible=True,
)
with gr.TabItem("πŸ“ About", elem_id="theoremqa-tab-table2", id=2):
gr.Markdown(LEADERBORAD_INFO, elem_classes="markdown-text")
# table 3
# with gr.TabItem("πŸš€ Submit here! ", elem_id="mtheoremqa-tab-table", id=3):
# gr.Markdown(LEADERBORAD_INTRODUCTION, elem_classes="markdown-text")
# with gr.Row():
# gr.Markdown(SUBMIT_INTRODUCTION, elem_classes="markdown-text")
# with gr.Row():
# gr.Markdown("# βœ‰οΈβœ¨ Submit your model evaluation json file here!", elem_classes="markdown-text")
# with gr.Row():
# with gr.Column():
# model_name_textbox = gr.Textbox(
# label="Model name", placeholder="LaVie"
# )
# revision_name_textbox = gr.Textbox(
# label="Revision Model Name", placeholder="LaVie"
# )
# with gr.Column():
# model_link = gr.Textbox(
# label="Model Link", placeholder="https://huggingface.co./decapoda-research/llama-7b-hf"
# )
# with gr.Column():
# input_file = gr.components.File(label = "Click to Upload a json File", file_count="single", type='binary')
# submit_button = gr.Button("Submit Eval")
# submission_result = gr.Markdown()
# submit_button.click(
# add_new_eval,
# inputs = [
# input_file,
# model_name_textbox,
# revision_name_textbox,
# model_link,
# ],
# )
# def refresh_data():
# value1 = get_baseline_df()
# return value1
# with gr.Row():
# data_run = gr.Button("Refresh")
# data_run.click(on_filter_model_size_method_change, inputs=[checkbox_group], outputs=data_component)
block.launch()