陈俊杰 commited on
Commit
1edab07
1 Parent(s): 38d9f8d

more beaautiful

Browse files
Files changed (1) hide show
  1. app.py +53 -59
app.py CHANGED
@@ -1,68 +1,62 @@
1
  import streamlit as st
2
  import pandas as pd
3
 
4
- # 标题
5
- st.title('AEOLLM leaderboard')
6
-
7
- # 描述
8
- st.write("This leaderboard is used to show the performance of the automation evaluation of LLMs submitted by the AEOLLM team on four task: Summary Generation (SE), Non-Factoid QA (NFQA), Dialogue Generation (DG), Text Expansion (TE).")
9
-
10
- # 创建示例数据
11
- SG = {
12
- "methods": ["Model A", "Model B", "Model C"],
13
- "team": ["U1", "U2", "U3"],
14
- "acc": [0.75, 0.64, 0.83],
15
- "tau": [0.05, 0.28, 0.16],
16
- "s": [0.12, 0.27, 0.18]
17
  }
18
- df1 = pd.DataFrame(SG)
19
-
20
- NFQA = {
21
- "methods": ["Model A", "Model B", "Model C"],
22
- "team": ["U1", "U2", "U3"],
23
- "acc": [0.75, 0.64, 0.83],
24
- "tau": [0.05, 0.28, 0.16],
25
- "s": [0.12, 0.27, 0.18]
26
  }
27
- df2 = pd.DataFrame(NFQA)
28
-
29
- DG = {
30
- "methods": ["Model A", "Model B", "Model C"],
31
- "team": ["U1", "U2", "U3"],
32
- "acc": [0.75, 0.64, 0.83],
33
- "tau": [0.05, 0.28, 0.16],
34
- "s": [0.12, 0.27, 0.18]
35
  }
36
- df3 = pd.DataFrame(DG)
37
-
38
- TE = {
39
- "methods": ["Model A", "Model B", "Model C"],
40
- "team": ["U1", "U2", "U3"],
41
- "acc": [0.75, 0.64, 0.83],
42
- "tau": [0.05, 0.28, 0.16],
43
- "s": [0.12, 0.27, 0.18]
44
  }
45
- df4 = pd.DataFrame(TE)
46
-
47
- # 创建标签页
48
- tab1, tab2, tab3, tab4 = st.tabs(["SG", "NFQA", "DG", "TE"])
49
-
50
- # 在标签页 1 中添加内容
51
- with tab1:
52
- st.header("summary geenration")
53
- st.dataframe(df1)
54
 
55
- # 在标签页 2 中添加内容
56
- with tab2:
57
- st.header("Non-Factoid QA")
58
- st.dataframe(df2)
59
-
60
- # 在标签页 3 中添加内容
61
- with tab3:
62
- st.header("Dialogue Generation")
63
- st.dataframe(df3)
64
 
65
- # 在标签页 3 中添加内容
66
- with tab4:
67
- st.header("Text Expansion")
68
- st.dataframe(df4)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import streamlit as st
2
  import pandas as pd
3
 
4
+ # CSS样式
5
+ st.markdown("""
6
+ <style>
7
+ body {
8
+ color: #fff;
9
+ background-color: #333;
 
 
 
 
 
 
 
10
  }
11
+ .stDataFrame {
12
+ font-family: Arial;
13
+ font-size: 16px;
 
 
 
 
 
14
  }
15
+ .stHeader {
16
+ color: #ff6347;
 
 
 
 
 
 
17
  }
18
+ div.stButton > button:first-child {
19
+ background-color: #ff6347;
20
+ color: #fff;
 
 
 
 
 
21
  }
22
+ </style>
23
+ """, unsafe_allow_html=True)
 
 
 
 
 
 
 
24
 
25
+ # 标题和描述
26
+ st.title('AEOLLM leaderboard')
27
+ st.write("This leaderboard is used to show the performance of the automation evaluation methods of LLMs submitted by the AEOLLM team on four tasks: Summary Generation (SG), Non-Factoid QA (NFQA), Dialogue Generation (DG), Text Expansion (TE).")
 
 
 
 
 
 
28
 
29
+ # 创建示例数据
30
+ def create_data():
31
+ return {
32
+ "methods": ["Model A", "Model B", "Model C"],
33
+ "team": ["U1", "U2", "U3"],
34
+ "acc": [0.75, 0.64, 0.83],
35
+ "tau": [0.05, 0.28, 0.16],
36
+ "s": [0.12, 0.27, 0.18]
37
+ }
38
+
39
+ df1 = pd.DataFrame(create_data())
40
+ df2 = pd.DataFrame(create_data())
41
+ df3 = pd.DataFrame(create_data())
42
+ df4 = pd.DataFrame(create_data())
43
+
44
+ # 使用列功能进行布局
45
+ col1, col2 = st.columns(2)
46
+ with col1:
47
+ tab1, tab2 = st.tabs(["SG", "NFQA"])
48
+ with tab1:
49
+ st.header("Summary Generation")
50
+ st.dataframe(df1)
51
+ with tab2:
52
+ st.header("Non-Factoid QA")
53
+ st.dataframe(df2)
54
+
55
+ with col2:
56
+ tab3, tab4 = st.tabs(["DG", "TE"])
57
+ with tab3:
58
+ st.header("Dialogue Generation")
59
+ st.dataframe(df3)
60
+ with tab4:
61
+ st.header("Text Expansion")
62
+ st.dataframe(df4)