陈俊杰 commited on
Commit
ed65812
·
1 Parent(s): f48f907
Files changed (1) hide show
  1. app.py +2 -29
app.py CHANGED
@@ -135,9 +135,6 @@ st.markdown("""
135
  font-family: 'Times New Roman', serif;
136
  line-height: 1.6;
137
  }
138
- .dataframe th, .dataframe td {
139
- font-size: 24px;
140
- }
141
  </style>
142
  """, unsafe_allow_html=True)
143
 
@@ -331,32 +328,8 @@ This leaderboard is used to show the performance of the <strong>automatic evalua
331
 
332
  with tab4:
333
  st.markdown("""<p class='main-text'>Task: Non-Factoid QA; Dataset: NF_CATS</p>""", unsafe_allow_html=True)
334
- # 将 DataFrame 转换为 HTML 表格
335
- html_table = df4.to_html(index=False)
336
-
337
- # 定义样式并使用 DataTables 使表格具有排序、搜索、放大等功能
338
- styled_table = f"""
339
- <link rel="stylesheet" href="https://cdn.datatables.net/1.10.24/css/jquery.dataTables.min.css">
340
- <script src="https://code.jquery.com/jquery-3.5.1.js"></script>
341
- <script src="https://cdn.datatables.net/1.10.24/js/jquery.dataTables.min.js"></script>
342
- <script>
343
- $(document).ready(function() {{
344
- $('#dataframe').DataTable();
345
- }});
346
- </script>
347
- <style>
348
- table {{
349
- font-size: 16px;
350
- width: 100%;
351
- }}
352
- </style>
353
- <table id="dataframe" class="display">
354
- {html_table[html_table.find('<thead>') : ]}
355
- </table>
356
- """
357
-
358
- # 在 Streamlit 中显示 HTML 表格
359
- st.write(styled_table, unsafe_allow_html=True)
360
  elif page == "Organisers":
361
  st.header("Organisers")
362
  st.markdown("""
 
135
  font-family: 'Times New Roman', serif;
136
  line-height: 1.6;
137
  }
 
 
 
138
  </style>
139
  """, unsafe_allow_html=True)
140
 
 
328
 
329
  with tab4:
330
  st.markdown("""<p class='main-text'>Task: Non-Factoid QA; Dataset: NF_CATS</p>""", unsafe_allow_html=True)
331
+ st.dataframe(df4, hide_index=True)
332
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
333
  elif page == "Organisers":
334
  st.header("Organisers")
335
  st.markdown("""