| import gradio as gr | |
| import pandas as pd | |
| file1 = 'basic_en.csv' | |
| df1 = pd.read_csv(file1) | |
| file2 ='contextual_en.csv' | |
| df2 = pd.read_csv(file2) | |
| file3 ='overall_en.csv' | |
| df3 = pd.read_csv(file3) | |
| def display_table(table_choice): | |
| if table_choice == "Option 1: Reasoning Capability Composite Ranking": | |
| return df3 | |
| elif table_choice == "Option 2: Basic Logical Inference Ranking": | |
| return df1 | |
| elif table_choice == "Option 3: Contextual Reasoning Capability Ranking": | |
| return df2 | |
| with gr.Blocks() as demo: | |
| gr.Markdown( | |
| """ | |
| # Evaluating the Reasoning Capabilities of Large Language Models in Chinese-language Contexts / 中文语境下的大语言模型推理能力评测 | |
| by Zhenhui(Jack) Jiang<sup>1</sup>, Yi Lu<sup>1</sup>, Yifan Wu<sup>1</sup>, Haozhe Xu<sup>2</sup>, Zhengyu Wu<sup>1</sup>, Jiaxin Li<sup>1</sup> / 蒋镇辉<sup>1</sup>,鲁艺<sup>1</sup>,吴轶凡<sup>1</sup>,徐昊哲<sup>2</sup>,武正昱<sup>1</sup>,李佳欣<sup>1</sup> | |
| <br><sup>1</sup>HKU Business School,<sup>2</sup>The School of Management, Xi’an Jiaotong University | |
| """) | |
| with gr.Tab("Reasoning Capability of Large Language Models"): | |
| with gr.Column(): | |
| dropdown = gr.Dropdown(choices=["Option 1: Reasoning Capability Composite Ranking", | |
| "Option 2: Basic Logical Inference Ranking", | |
| "Option 3: Contextual Reasoning Capability Ranking"], | |
| label="Select a Leaderboard", | |
| value="Option 1: Reasoning Capability Composite Ranking") | |
| output = gr.DataFrame(value=df3, max_height =1800) | |
| dropdown.change(fn=display_table, inputs=dropdown, outputs=output) | |
| demo.launch() |