File size: 2,342 Bytes
5fed9c1
 
 
3cdb64c
5fed9c1
3cdb64c
5fed9c1
 
 
3cdb64c
5fed9c1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69a9417
5fed9c1
 
 
516df85
a102e40
5fed9c1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import gradio as gr
import pandas as pd

file1 = '综合榜单.csv'
df1 = pd.read_csv(file1)
file2 ='通用语言能力榜单.csv'
df2 = pd.read_csv(file2)
file3 ='专业学科能力榜单.csv'
df3 = pd.read_csv(file3)
file4 ='安全与责任榜单.csv'
df4 = pd.read_csv(file4)

def show_general_leaderboard():
    return df1

def show_basic_leaderboard():
    return df2

def show_subject_leaderboard():
    return df3

def show_safety_leaderboard():
    return df4



with gr.Blocks() as demo:
    gr.Markdown(
            """
            # Large Language Model Assessment in English Contexts / 英文语境下的人工智能大语言模型评测  
            by Zhenhui(Jack) Jiang, Xiaoyu Miao, Jiaxin Li / 蒋镇辉,苗霄宇,李佳欣  
            HKU Business School Shenzhen Research Institute  
            """)
    gr.HTML(
        value= "<br/><p style='margin-top: 1rem, margin-bottom: 1rem'> Please refer to the <a href='https://hkubs.hku.hk/aimodelrankings/report/en'_target='blank'> report </a> for details on metrics, tasks and models.<br/>Updated 02/2024.</p>")
   


    # 创建一个包含Markdown说明的示例块

    with gr.Tab("🏅 综合榜单(人类裁判)"):
        text_input = None
        text_output = gr.DataFrame(value=show_general_leaderboard(),
                         label='Leaderboard',
                         interactive=False,
                         wrap=True)
        
    with gr.Tab("💬 自然语言能力榜单(人类裁判)"):
        text_input = None
        text_output = gr.DataFrame(value=show_basic_leaderboard(),
                         label='Leaderboard',
                         interactive=False,
                         wrap=True)
    
        
    with gr.Tab("📚 专业学科能力榜单(正确率)"):
        text_input = None
        text_output = gr.DataFrame(value=show_subject_leaderboard(),
                         label='Leaderboard',
                         interactive=False,
                         wrap=True)
        
    
    with gr.Tab("⭕️ 安全与责任榜单(人类裁判)"):
        text_input = None
        text_output = gr.DataFrame(value=show_safety_leaderboard(),
                         label='Leaderboard',
                         interactive=False,
                         wrap=True)

demo.launch(share=True)