陈俊杰 commited on
Commit
5447046
1 Parent(s): b2f3985
Files changed (1) hide show
  1. app.py +15 -6
app.py CHANGED
@@ -3,6 +3,7 @@ from streamlit_option_menu import option_menu
3
  import pandas as pd
4
  from datetime import datetime
5
  import pytz
 
6
 
7
  # 设置页面标题和大标题
8
  st.set_page_config(page_title="AEOLLM", page_icon="👋")
@@ -194,12 +195,6 @@ This leaderboard is used to show the performance of the <strong>automatic evalua
194
  <p>The Leaderboard will be updated daily around 24:00 Beijing Time.</p>
195
  </p>
196
  """, unsafe_allow_html=True)
197
- # 获取北京时间
198
- beijing_tz = pytz.timezone('Asia/Shanghai')
199
- beijing_time = datetime.now(beijing_tz)
200
-
201
- # 在页面上显示北京时间
202
- st.write("Current Beijing Time:", beijing_time.strftime('%Y-%m-%d %H:%M:%S'))
203
  # 创建示例数据
204
 
205
  # teamId 唯一标识码
@@ -263,6 +258,20 @@ This leaderboard is used to show the performance of the <strong>automatic evalua
263
  with tab4:
264
  st.markdown("""<p class='main-text'>Task: Non-Factoid QA; Dataset: NF_CATS</p>""", unsafe_allow_html=True)
265
  st.dataframe(df4, use_container_width=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
266
 
267
  elif page == "Organisers":
268
  st.header("Organisers")
 
3
  import pandas as pd
4
  from datetime import datetime
5
  import pytz
6
+ import time
7
 
8
  # 设置页面标题和大标题
9
  st.set_page_config(page_title="AEOLLM", page_icon="👋")
 
195
  <p>The Leaderboard will be updated daily around 24:00 Beijing Time.</p>
196
  </p>
197
  """, unsafe_allow_html=True)
 
 
 
 
 
 
198
  # 创建示例数据
199
 
200
  # teamId 唯一标识码
 
258
  with tab4:
259
  st.markdown("""<p class='main-text'>Task: Non-Factoid QA; Dataset: NF_CATS</p>""", unsafe_allow_html=True)
260
  st.dataframe(df4, use_container_width=True)
261
+
262
+ # 获取北京时间
263
+ time_placeholder = st.empty()
264
+ beijing_tz = pytz.timezone('Asia/Shanghai')
265
+ beijing_time = datetime.now(beijing_tz)
266
+ while True:
267
+ # 获取当前的北京时间
268
+ beijing_time = datetime.now(beijing_tz)
269
+
270
+ # 在页面上动态显示当前北京时间
271
+ time_placeholder.write("当前北京时间: " + beijing_time.strftime('%Y-%m-%d %H:%M:%S'))
272
+
273
+ # 设置更新频率为每秒钟一次
274
+ time.sleep(1)
275
 
276
  elif page == "Organisers":
277
  st.header("Organisers")