Spaces:
Sleeping
Sleeping
shyuli commited on
Commit Β·
8d42d3a
1
Parent(s): 0c66818
version v0.1
Browse files154 unmodified lines155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187154 unmodified lines)demo = gr.Blocks(css=custom_css)with demo:gr.HTML(TITLE)with gr.Tabs(elem_classes="tab-buttons"):with gr.TabItem("π SearchAgent Benchmark"):leaderboard = init_leaderboard(LEADERBOARD_DF)gr.HTML(INTRODUCTION_TEXT, elem_classes="markdown-text")with gr.TabItem("π About"):gr.HTML(LLM_BENCHMARKS_TEXT, elem_classes="markdown-text")with gr.TabItem("π€ Submit Model"):with gr.Column():gr.HTML(EVALUATION_QUEUE_TEXT, elem_classes="markdown-text")with gr.Row():with gr.Accordion("π Citation", open=False):citation_button = gr.Textbox(value=CITATION_BUTTON_TEXT,label=CITATION_BUTTON_LABEL,lines=20,elem_id="citation-button",show_copy_button=True,)scheduler = BackgroundScheduler()scheduler.add_job(restart_space, "interval", seconds=1800)scheduler.start()demo.launch()154 unmodified lines155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194154 unmodified lines)def create_demo():"""Create the Gradio interface."""with gr.Blocks(css=custom_css) as demo:gr.HTML(TITLE)tabs = gr.Tabs()with tabs:with gr.Tab("π SearchAgent Benchmark"):leaderboard = init_leaderboard(LEADERBOARD_DF)gr.HTML(INTRODUCTION_TEXT)with gr.Tab("π About"):gr.HTML(LLM_BENCHMARKS_TEXT)with gr.Tab("π€ Submit Model"):with gr.Column():gr.HTML(EVALUATION_QUEUE_TEXT)with gr.Row():with gr.Accordion("π Citation", open=False):citation_button = gr.Textbox(value=CITATION_BUTTON_TEXT,label=CITATION_BUTTON_LABEL,lines=20,elem_id="citation-button",show_copy_button=True,)return demodemo = create_demo()scheduler = BackgroundScheduler()scheduler.add_job(restart_space, "interval", seconds=1800)scheduler.start()demo.launch(show_error=True)
app.py+33-26