import gradio as gr import pandas as pd file1 = 'basic.csv' df1 = pd.read_csv(file1) file2 ='contextual.csv' df2 = pd.read_csv(file2) file3 ='Overall.csv' df3 = pd.read_csv(file3) def display_table(table_choice): if table_choice == "Option 1: 大语言模型推理能力综合排名": return df3 elif table_choice == "Option 2: 基础逻辑能力排名": return df1 elif table_choice == "Option 3: 情境推理能力排名": return df2 with gr.Blocks() as demo: gr.Markdown( """ # Evaluating the Reasoning Capabilities of Large Language Models in Chinese-language Contexts / 中文语境下的大语言模型推理能力评测 by Zhenhui(Jack) Jiang1, Yi Lu1, Yifan Wu1, Haozhe Xu2, Zhengyu Wu1, Jiaxin Li1 / 蒋镇辉1,鲁艺1,吴轶凡1,徐昊哲2,武正昱1,李佳欣1
1香港大学经管学院,2西安交通大学管理学院 """) with gr.Tab("大语言模型推理能力评测"): with gr.Column(): dropdown = gr.Dropdown(choices=["Option 1: 大语言模型推理能力综合排名", "Option 2: 基础逻辑能力排名", "Option 3: 情境推理能力排名"], label="Select a Leaderboard", value="Option 1: 大语言模型推理能力综合排名") output = gr.DataFrame(value=df3, max_height =1800) dropdown.change(fn=display_table, inputs=dropdown, outputs=output) demo.launch()