File size: 23,026 Bytes
7f6ca6e
6a26f80
7f6ca6e
cd37723
 
5447046
7f6ca6e
a52e4dc
5c4f7bb
a52e4dc
 
 
6a26f80
 
 
496eb7b
221547a
 
6a26f80
 
 
4b6b54f
6a26f80
 
 
 
 
a52e4dc
ed0637e
 
335ee08
3d68f4c
335ee08
 
3d68f4c
335ee08
3415404
c178741
ca3e812
c178741
c8d8fbe
1f0ed0b
c8d8fbe
 
b91860a
9a958c5
1f0ed0b
b91860a
ed0637e
 
 
 
a52e4dc
 
 
 
9348641
 
 
 
 
da31ad5
a52e4dc
 
 
5a79da8
 
 
a52e4dc
000fbcd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
193e99f
000fbcd
 
 
 
 
 
 
 
 
 
 
6280ba1
a52e4dc
 
9f4f414
193e99f
03d0a26
 
 
9f4f414
 
 
 
193e99f
9f4f414
193e99f
 
 
 
 
9348641
9f4f414
9348641
9f4f414
9348641
096eb0c
 
193e99f
1d69722
 
 
 
 
 
 
 
a52e4dc
 
 
 
b2f3985
53464fb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9f4f414
9c1c5a0
 
 
221547a
 
a52e4dc
c8d8fbe
 
 
 
 
58a6cbb
c8d8fbe
 
 
 
 
 
 
 
 
 
58a6cbb
c8d8fbe
 
 
 
 
 
a52e4dc
 
 
9a263a1
 
000fbcd
 
 
 
 
6280ba1
a52e4dc
ad21e8b
a52e4dc
5cd297d
 
 
 
 
221547a
 
 
 
 
 
 
 
ad21e8b
 
 
83caa2d
cd37723
9348641
5f37ab9
9348641
a52e4dc
 
 
 
ca3e812
03d0a26
ca3e812
a52e4dc
167bc7e
 
f51ed55
167bc7e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a52e4dc
 
4ef8e34
 
b781bf5
167bc7e
 
b781bf5
 
4ef8e34
 
 
167bc7e
 
a52e4dc
167bc7e
b781bf5
 
4ef8e34
 
 
167bc7e
 
a52e4dc
167bc7e
b781bf5
 
4ef8e34
 
 
167bc7e
 
a52e4dc
167bc7e
b781bf5
 
4ef8e34
 
 
167bc7e
 
a52e4dc
b781bf5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a52e4dc
167bc7e
496eb7b
a52e4dc
496eb7b
 
 
a52e4dc
496eb7b
 
 
a52e4dc
496eb7b
 
 
a52e4dc
496eb7b
 
 
167bc7e
ad0e011
b781bf5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4db5d9d
b781bf5
 
 
 
4db5d9d
88915d0
1119a17
 
71bd20c
88915d0
71bd20c
221547a
71bd20c
88915d0
5447046
 
 
 
 
 
 
 
 
932ed5c
5447046
 
 
ed65812
a52e4dc
 
 
9a263a1
a52e4dc
 
 
 
1fcc3f5
 
 
3d68f4c
a52e4dc
 
b0e4c3b
 
932ed5c
 
 
 
b0e4c3b
a52e4dc
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
import streamlit as st
from streamlit_option_menu import option_menu
import pandas as pd
from datetime import datetime
import pytz
import time

# 设置页面标题和大标题
st.set_page_config(page_title="AEOLLM", page_icon="👋", layout="wide")
st.title("NTCIR-18 Automatic Evaluation of LLMs (AEOLLM) Task")

# 在侧边栏创建导航菜单
with st.sidebar:
    page = option_menu(
        "Navigation", 
        ["LeaderBoard", "Introduction", "Methodology", "Datasets", "Important Dates", 
         "Evaluation Metrics", "Submit", "Organisers", "References"],
        icons=['trophy', 'house', 'book', 'database', 'calendar', 'clipboard', 'upload', 'people', 'book'],
        menu_icon="cast", 
        default_index=0,
        styles={
            "container": {"padding": "5px"},
            "icon": {"color": "orange", "font-size": "18px"}, 
            "nav-link": {"font-size": "16px", "text-align": "left", "margin":"0px", "--hover-color": "#6c757d"},
            "nav-link-selected": {"background-color": "#FF6347"},
        }
    )

st.markdown("""
    <style>
    .dataframe th {
        min-width: 100px;
    }
    .dataframe td {
        min-width: 100px;
    }
    /* 应用到所有的Markdown渲染文本 */
    div[data-testid="stMarkdownContainer"] p,
    div[data-testid="stMarkdownContainer"] table,
    div[data-testid="stMarkdownContainer"] li {
        font-size: 24px;
        font-family: 'Times New Roman', serif;
        line-height: 1.6;
    }
    .main-text {
        font-size: 24px;
        font-family: 'Times New Roman', serif;
        line-height: 1.6;
    }
    </style>
    """, unsafe_allow_html=True)

# 根据选择的页面展示不同的内容
if page == "Introduction":
    st.header("Introduction")
    st.markdown("""
<p class='main-text'>The Automatic Evaluation of LLMs (AEOLLM) task is a new core task in <a href="http://research.nii.ac.jp/ntcir/ntcir-18">NTCIR-18</a> to support in-depth research on large language models (LLMs) evaluation. 
<br />🔍  As LLMs grow popular in both fields of academia and industry, how to effectively evaluate the capacity of LLMs becomes an increasingly critical but still challenging issue.
<br />⚖️ Existing methods can be divided into two types: manual evaluation, which is expensive, and automatic evaluation, which faces many limitations including the task format (the majority belong to multiple-choice questions) and evaluation criteria (occupied by reference-based metrics). 
<br />💡 To advance the innovation of automatic evaluation, we proposed the Automatic Evaluation of LLMs (AEOLLM) task which focuses on generative tasks and encourages reference-free methods. Besides, we set up diverse subtasks such as summary generation, non-factoid question answering, text expansion, and dialogue generation to comprehensively test different methods. 
<br />🚀 We believe that the AEOLLM task will facilitate the development of the LLMs community.</p>
    """, unsafe_allow_html=True)

elif page == "Methodology":
    st.header("Methodology")
    col1, col2, col3 = st.columns([1, 3, 1])
    with col2:
        st.image("asserts/method.svg", use_column_width=True)
    st.markdown("""
<p class='main-text'>First, we choose four subtasks as shown in the table below:</p>
<table class='main-text'>
<thead>
    <tr>
    <th style="text-align: left">Task</th>
    <th style="text-align: left">Description</th>
    <th style="text-align: left">Dataset</th>
    </tr>
</thead>
<tbody>
    <tr>
    <td style="text-align: left">Summary Generation (SG)</td>
    <td style="text-align: left">write a summary for the specified text</td>
    <td style="text-align: left">XSum: over 226k news articles</td>
    </tr>
    <tr>
    <td style="text-align: left">Non-Factoid QA (NFQA)</td>
    <td style="text-align: left">construct long-form answers to open-ended non-factoid questions</td>
    <td style="text-align: left">NF_CATS: 12k non-factoid questions</td>
    </tr>
    <tr>
    <td style="text-align: left">Text Expansion (TE)</td>
    <td style="text-align: left">given a theme, participants need to generate stories related to the theme</td>
    <td style="text-align: left">WritingPrompts: 303k story themes</td>
    </tr>
    <tr>
    <td style="text-align: left">Dialogue Generation (DG)</td>
    <td style="text-align: left">generate human-like responses to numerous topics in daily conversation contexts</td>
    <td style="text-align: left">DailyDialog: 13k daily conversation contexts</td>
    </tr>
</tbody>
</table>
<p class='main-text'>Second, we choose a series of popular LLMs during the competition to generate answers.</p>
<p class='main-text'>Third, we manually annotate the answer sets for each question, which will be used as gold standards for evaluating the performance of different evaluation methods.</p>
<p class='main-text'>Last, we will collect evaluation results from participants and calculate consistency with manually annotated results. We will use Accuracy, Kendall’s tau and Spearman correlation coefficient as the evaluation metrics.</p>
    """,unsafe_allow_html=True)

elif page == "Datasets":
    st.header("Answer Generation")
    st.markdown("""
We randomly sampled **100 instances** from **each** dataset as the question set and selected **7 different LLMs** to generate answers, forming the answer set. 

As a result, each dataset produced 700 instances, totaling **2,800 instances across the four datasets**.
""")
    st.header("Human Annotation")
    st.markdown("""
- For each instance (question-answer pair), we employed human annotators to provide a score ranging from 1 to 5 and took the median of these scores as the final score. 

- Based on this score, we calculated the rankings of the 7 answers for each question. If scores were identical, the answers were assigned the same rank, with the lowest rank being used.
""")
    st.header("Data Acquisition and Usage")
    st.markdown("""
We divided the 2,800 instances into three parts:

1️⃣ train set: 20% of the data (covering all four datasets) was designated as the training set (including human annotations) for participants to reference when designing their methods.

2️⃣ test set: Another 20% of the data was set aside as the test set (excluding human annotations), used to evaluate the performance of participants' methods and to generate the **leaderboard**.

3️⃣ reserved set: The remaining 60% of the data was reserved for **the final evaluation**.

Both the training set and the test set can be downloaded from the provided link: [https://huggingface.co/datasets/THUIR/AEOLLM](https://huggingface.co/datasets/THUIR/AEOLLM).                            
""")
    st.header("Resources")
    st.markdown("""
<p class='main-text'>A brief description of the specific dataset we used, along with the original download link, is provided below:</p>
<p class='main-text'>1. <strong>Summary Generation (SG): <a href="https://huggingface.co/datasets/EdinburghNLP/xsum">Xsum</a></strong>: A real-world single document news summary dataset collected from online articles by the British Broadcasting Corporation (BBC) and contains over 220 thousand news documents.</p>
<p class='main-text'>2. <strong>Non-Factoid QA (NFQA): <a href="https://github.com/Lurunchik/NF-CATS">NF_CATS</a></strong>: A dataset contains examples of 12k natural questions divided into eight categories.</p>
<p class='main-text'>3. <strong>Text Expansion (TE): <a href="https://huggingface.co/datasets/euclaise/writingprompts">WritingPrompts</a></strong>: A large dataset of 300K human-written stories paired with writing prompts from an online forum.</p>
<p class='main-text'>4. <strong>Dialogue Generation (DG): <a href="https://huggingface.co/datasets/daily_dialog">DailyDialog</a></strong>: A high-quality dataset of 13k multi-turn dialogues. The language is human-written and less noisy.</p>
    """,unsafe_allow_html=True)

elif page == "Important Dates":
    st.header("Important Dates")
    st.markdown("""
<p class='main-text'>All deadlines are at 11:59pm in the Anywhere on Earth (AOE) timezone.</p>
""", unsafe_allow_html=True)
    
    col1, col2 = st.columns(2)
    with col1:
        st.markdown("""
<span class='main-text'><strong>Kickoff Event</strong>:</span> <br />
<span class='main-text'><strong>Dataset Release</strong>:</span> <br />
<span class='main-text'><strong>Dry run Deadline</strong>:</span><br />
<span class='main-text'><strong>Formal run</strong>:</span> <br />
<span class='main-text'><strong>Evaluation Results Release</strong>:</span>  <br />
<span class='main-text'><strong>Task overview release (draft)</strong>:</span> <br />
<span class='main-text'><strong>Submission Due of Participant Papers (draft)</strong>:</span> <br />
<span class='main-text'><strong>Camera-Ready Participant Paper Due</strong>:</span><br />
<span class='main-text'><strong>NTCIR-18 Conference</strong>:</span> <br />
""",unsafe_allow_html=True)
    with col2:
        st.markdown("""
<span class='main-text'>March 29, 2024</span><br />
<span class='main-text'>May 1, 2024</span><br />
<span class='main-text'>👉Jan 15, 2025</span><br />
<span class='main-text'>Jan 15, 2025 - Feb 1, 2025</span>  <br />
<span class='main-text'>Feb 1, 2025</span>  <br />
<span class='main-text'>Feb 1, 2025</span><br />
<span class='main-text'>March 1, 2025</span><br />
<span class='main-text'>May 1, 2025</span><br />
<span class='main-text'>Jun 10-13 2025</span><br />
""",unsafe_allow_html=True)
    st.markdown("""
<p>During the Dry run (until Jan 15, 2025), we will use the <a href="https://huggingface.co/datasets/THUIR/AEOLLM">test set (https://huggingface.co/datasets/THUIR/AEOLLM)</a> to evaluate the performance of participants' methods and release the results on the Leaderboard. 
<br />                
Before the Formal run begins (before Jan 15, 2025), we will release the reserved set. Participants need to submit their results for the reserved set before the Formal run ends (before Feb 1, 2025).</p>
""",unsafe_allow_html=True)
elif page == "Evaluation Metrics":
    st.header("Evaluation Metrics")
    st.markdown("""
- **Acc(Accuracy):** The proportion of identical preference results between the model and human annotations. Specifically, we first convert individual scores (ranks) into pairwise preferences and then calculate consistency with human annotations.

- **Kendall's tau:** Measures the ordinal association between two ranked variables.
  
  $$
    \\tau=\\frac{C-D}{\\frac{1}{2}n(n-1)}
  $$
  
  where:
  - $C$ is the number of concordant pairs,
  - $D$ is the number of discordant pairs,
  - $n$ is the number of pairs.

- **Spearman's Rank Correlation Coefficient:** Measures the strength and direction of the association between two ranked variables.
  
  $$
    \\rho = 1 - \\frac{6 \sum d_i^2}{n(n^2 - 1)}
  $$
  
  where:
  - $d_i$ is the difference between the ranks of corresponding elements in the two lists,
  - $n$ is the number of elements.
""",unsafe_allow_html=True)
elif page == "Data and File format":
    st.header("Data and File format")
    st.markdown("""
<p class='main-text'>We will be following a similar format as the ones used by most <strong>TREC submissions</strong>, which is repeated below. White space is used to separate columns. The width of the columns in the format is not important, but it is important to have exactly five columns per line with at least one space between the columns.</p>
<p class='main-text'><strong>taskId  questionId  answerId  score  rank</strong></p>
<p class='main-text'>1. the first column is the taskeId (index different tasks)</p>
<p class='main-text'>2. the second column is questionId (index different questions in the same task)</p>
<p class='main-text'>3. the third column is answerId (index the answer provided by different LLMs to the same question)</p>
<p class='main-text'>4. the fourth column is score (index the score to the answer given by participants)</p>
<p class='main-text'>5. the fifth column is rank (index the rank of the answer within all answers to the same question)</p>
    """,unsafe_allow_html=True)
elif page == "Submit":
    st.header("File Format")
    st.markdown("""
We will be following a similar format as the ones used by most **TREC submissions**: 

1. White space is used to separate columns.

2. The width of the columns in the format is not important, but it is important to have exactly five columns per line with at least one space between the columns.

**taskId  questionId  answerId  score  rank**
                
- the first column is the taskeId (index different tasks)
- the second column is questionId (index different questions in the same task) 
- the third column is answerId (index the answer provided by different LLMs to the same question)
- the fourth column is score (index the score to the answer given by participants)
- the fifth column is rank (index the rank of the answer within all answers to the same question)
""")
    st.header("Submit")
    st.markdown("""
📄 Please organize the answers in a **txt** file, name the file as **teamId_methods.txt** and submit it through the link below: [https://forms.gle/vRNxBaNAfYZHMVtr5](https://forms.gle/vRNxBaNAfYZHMVtr5)

⏱️ Each team can submit up to 5 times per day, and only the latest submission will be considered. 
                
🔗 An example of the submission file content is [here](https://huggingface.co/spaces/THUIR/AEOLLM/blob/main/baseline_example/output/baseline1_chatglm3_6B.txt).
    """)
elif page == "LeaderBoard":
    # # 描述
    st.markdown("""
<p class='main-text'>
🏆 NTCIR-18 Automatic Evaluation Methods of LLMs (AEOLLM) task Leaderboard.
</p>
    """, unsafe_allow_html=True)
    df = {
        "TeamId": ["baseline", "baseline", "baseline", "baseline"],
        "Methods": ["chatglm3-6b", "baichuan2-13b", "chatglm-pro", "gpt-4o"],
        "Average (all 4 datatsets)": [],
        "Average (Dialogue Generation)": [],
        "Accuracy (Dialogue Generation)": [],
        "Kendall's Tau (Dialogue Generation)": [],
        "Spearman (Dialogue Generation)": [],
        "Average (Text Expansion)": [],
        "Accuracy (Text Expansion)": [],
        "Kendall's Tau (Text Expansion)": [],
        "Spearman (Text Expansion)": [],
        "Average (Summary Generation)": [],
        "Accuracy (Summary Generation)": [],
        "Kendall's Tau (Summary Generation)": [],
        "Spearman (Summary Generation)": [],
        "Average (Non-Factoid QA)": [],
        "Accuracy (Non-Factoid QA)": [],
        "Kendall's Tau (Non-Factoid QA)": [],
        "Spearman (Non-Factoid QA)": [],
    }

    TeamId = ["baseline", "baseline", "baseline", "baseline", 'ISLab', 'ISLab', 'ISLab', 'ISLab', 'ISLab', 'ISLab', 'ISLab', 'ISLab']
    Methods = ["chatglm3-6b", "baichuan2-13b", "chatglm-pro", "gpt-4o", 'gpt4o-mini-baseline', 'gpt4o-mini-baseline2', 'llama3-1-baseline', 'llama3-1-baseline2', 'short -test', 'lst2', 'lst3', 'lstt']

    # teamId 唯一标识码
    DG = {
        "TeamId": TeamId,
        "Methods": Methods,
        "Accuracy": [0.5806, 0.5483, 0.6001, 0.6472, 0, 0, 0, 0, 0, 0, 0, 0],
        "Kendall's Tau": [0.3243, 0.1739, 0.3042, 0.4167, 0, 0, 0, 0, 0, 0, 0, 0],
        "Spearman": [0.3505, 0.1857, 0.3264, 0.4512, 0, 0, 0, 0, 0, 0, 0, 0]
    }
    df1 = pd.DataFrame(DG)

    TE = {
        "TeamId": TeamId,
        "Methods": Methods,
        "Accuracy": [0.5107, 0.5050, 0.5461, 0.5581, 0, 0, 0, 0, 0, 0, 0, 0],
        "Kendall's Tau": [0.1281, 0.0635, 0.2716, 0.3864, 0, 0, 0, 0, 0, 0, 0, 0],
        "Spearman": [0.1352, 0.0667, 0.2867, 0.4157, 0, 0, 0, 0, 0, 0, 0, 0]
    }
    df2 = pd.DataFrame(TE)

    SG = {
        "TeamId": TeamId,
        "Methods": Methods,
        "Accuracy": [0.6504, 0.6014, 0.7162, 0.7441, 0.7684735750360749, 0.7659274997877937, 0.7702904570919278, 0.7707237554112554, 0.7171193287921227, 0.7433948731007554, 0.7669608108394873, 0.7428272483235718],
        "Kendall's Tau": [0.3957, 0.2688, 0.5092, 0.5001, 0.5139446977332496, 0.5635917219315821, 0.5789961063044075, 0.5704551232357526, 0.5678532047471645, 0.49448829251394394, 0.5329295390524793, 0.5740499751693215],
        "Spearman": [0.4188, 0.2817, 0.5403, 0.5405, 0.5610788011671747, 0.6164421350125108, 0.6242002118163157, 0.6148419886082258, 0.6019919123404138, 0.533764470447043, 0.5685534007297164, 0.6145790156923595],
    }
    df3 = pd.DataFrame(SG)

    NFQA = {
        "TeamId": TeamId,
        "Methods": Methods,
        "Accuracy": [0.5935, 0.5817, 0.7000, 0.7203, 0, 0, 0, 0, 0, 0, 0, 0],
        "Kendall's Tau": [0.2332, 0.2389, 0.4440, 0.4235, 0, 0, 0, 0, 0, 0, 0, 0],
        "Spearman": [0.2443, 0.2492, 0.4630, 0.4511, 0, 0, 0, 0, 0, 0, 0, 0]
    }
    df4 = pd.DataFrame(NFQA)

    OverAll = {
        "TeamId": TeamId,
        "Methods": Methods,
        "Accuracy": [],
        "Kendall's Tau": [],
        "Spearman": []
    }

    data = [DG, NFQA, SG, TE]
    task = ["Dialogue Generation", "Non-Factoid QA", "Summary Generation", "Text Expansion"]
    metric = ["Accuracy", "Kendall's Tau", "Spearman"]

    for m in metric:
        # 每个指标
        metric_score = [0] * len(TeamId)
        for j in range(len(TeamId)):
            # 每支队伍
            for d in data:
                metric_score[j] += d[m][j]
        metric_score = [k / len(task) for k in metric_score]
        OverAll[m] = metric_score
    
    dfo = pd.DataFrame(OverAll)

    df = [df1, df2, df3, df4, dfo]
    for d in df:
        for col in d.select_dtypes(include=['float64', 'int64']).columns:
            d[col] = d[col].apply(lambda x: f"{x:.4f}")

    # # 创建标签页
    # tab1, tab2, tab3, tab4 = st.tabs(["DG", "TE", "SG", "NFQA"])

    # with tab1:
    #     st.markdown("""<p class='main-text'>Task: Dialogue Generation; Dataset: DialyDialog</p>""", unsafe_allow_html=True)
    #     st.dataframe(df1, use_container_width=True)

    # with tab2:
    #     st.markdown("""<p class='main-text'>Task: Text Expansion; Dataset: WritingPrompts</p>""", unsafe_allow_html=True)
    #     st.dataframe(df2, use_container_width=True)

    # with tab3:
    #     st.markdown("""<p class='main-text'>Task: Summary Generation; Dataset: Xsum</p>""", unsafe_allow_html=True)
    #     st.dataframe(df3, use_container_width=True)

    # with tab4:
    #     st.markdown("""<p class='main-text'>Task: Non-Factoid QA; Dataset: NF_CATS</p>""", unsafe_allow_html=True)
    #     st.dataframe(df4, use_container_width=True)

    st.markdown("""<p class='main-text'>Overall: The average across all four tasks</p>""", unsafe_allow_html=True)
    st.dataframe(dfo, use_container_width=True)

    st.markdown("""<p class='main-text'>Task: Dialogue Generation; Dataset: DialyDialog</p>""", unsafe_allow_html=True)
    st.dataframe(df1, use_container_width=True)

    st.markdown("""<p class='main-text'>Task: Text Expansion; Dataset: WritingPrompts</p>""", unsafe_allow_html=True)
    st.dataframe(df2, use_container_width=True)

    st.markdown("""<p class='main-text'>Task: Summary Generation; Dataset: Xsum</p>""", unsafe_allow_html=True)
    st.dataframe(df3, use_container_width=True)

    st.markdown("""<p class='main-text'>Task: Non-Factoid QA; Dataset: NF_CATS</p>""", unsafe_allow_html=True)
    st.dataframe(df4, use_container_width=True)
    
    # data = [DG, NFQA, SG, TE]
    # task = ["Dialogue Generation", "Non-Factoid QA", "Summary Generation", "Text Expansion"]
    # metric = ["Accuracy", "Kendall's Tau", "Spearman"]

    # overall_total = [0] * len(df["TeamId"])
    # for i, d in enumerate(data): # 每种数据集
    #     total = [0] * len(df["TeamId"]) # 长度初始化为方法数
    #     for j in range(len(metric)): # 每种指标
    #         index = f"{metric[j]} ({task[i]})"
    #         df[index] = d[metric[j]]
    #         for k in range(len(df["TeamId"])):
    #             total[k] += d[metric[j]][k]
    #     average_index = f"Average ({task[i]})"
    #     df[average_index] = [k / len(metric) for k in total]
    #     for k in range(len(df["TeamId"])):
    #         overall_total[k] += df[average_index][k]

    # df["Average (all 4 datatsets)"] = [k / len(task) for k in overall_total]
    
    # df = pd.DataFrame(df)
    # for col in df.select_dtypes(include=['float64', 'int64']).columns:
    #     df[col] = df[col].apply(lambda x: f"{x:.4f}")
    # st.dataframe(df,use_container_width=True)

    st.markdown("""
🔗 To register for AEOLLM task, you can visit the following link and choose our AEOLLM task: [https://research.nii.ac.jp/ntcir/ntcir-18/howto.html](https://research.nii.ac.jp/ntcir/ntcir-18/howto.html).

📃 To submit, refer to the "Submit" section in the left-hand navigation bar.🤗 A baseline example can be found in the [baseline_example](https://huggingface.co/spaces/THUIR/AEOLLM/tree/main/baseline_example) folder.

📝 Refer to other sections in the navigation bar for details on evaluation metrics, datasets, important dates and methodology.
                
🕒 The Leaderboard will be updated daily around 24:00 Beijing Time.
""")
    # 获取北京时间
    time_placeholder = st.empty()
    beijing_tz = pytz.timezone('Asia/Shanghai')
    beijing_time = datetime.now(beijing_tz)
    while True:
        # 获取当前的北京时间
        beijing_time = datetime.now(beijing_tz)
        
        # 在页面上动态显示当前北京时间
        time_placeholder.write("Current Beijing Time: " + beijing_time.strftime('%Y-%m-%d %H:%M:%S'))
        
        # 设置更新频率为每秒钟一次
        time.sleep(1)
        
elif page == "Organisers":
    st.header("Organisers")
    st.markdown("""
<p class='main-text'>
<em>Yiqun Liu</em> [yiqunliu@tsinghua.edu.cn] (Tsinghua University)<br />
<em>Qingyao Ai</em> [aiqy@tsinghua.edu.cn] (Tsinghua University)<br />
<em>Junjie Chen</em> [chenjj826@gmail.com] (Tsinghua University) <br />
<em>Zhumin Chu</em> [chuzm19@mails.tsinghua.edu.cn] (Tsinghua University)<br />
<em>Haitao Li</em> [liht22@mails.tsinghua.edu.cn] (Tsinghua University)<br />
Please feel free to contact us! 😉
</p>""",unsafe_allow_html=True)
    st.image("asserts/organizer.png")
elif page == "References":
    st.header("References")
    st.markdown("""
<p class='main-text'>[1] Mao R, Chen G, Zhang X, et al. GPTEval: A survey on assessments of ChatGPT and GPT-4. <a href="https://arxiv.org/pdf/2308.12488">pdf</a><br />
[2] Chang Y, Wang X, Wang J, et al. A survey on evaluation of large language models. <a href="https://dl.acm.org/doi/pdf/10.1145/3641289">pdf</a><br />
[3] Chan C M, Chen W, Su Y, et al. Chateval: Towards better llm-based evaluators through multi-agent debate. <a href="https://arxiv.org/pdf/2308.07201">pdf</a><br />
[4] Li R, Patel T, Du X. Prd: Peer rank and discussion improve large language model based evaluations. <a href="https://arxiv.org/pdf/2307.02762">pdf</a><br />
[5] Chu Z, Ai Q, Tu Y, et al. Pre: A peer review based large language model evaluator. <a href="https://arxiv.org/pdf/2401.15641">pdf</a></p>
""",unsafe_allow_html=True)