dongsheng commited on
Commit
73d8b74
·
verified ·
1 Parent(s): 5fe7967

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -19
app.py CHANGED
@@ -13,10 +13,8 @@ CITATION_BUTTON_TEXT = r"""@misc{2023opencompass,
13
  year={2023}
14
  }"""
15
  CITATION_BUTTON_LABEL = "Copy the following snippet to cite these results"
16
- # 开发环境
17
- # DATA_URL_BASE = "http://opencompass.oss-cn-shanghai.aliyuncs.com/dev-assets/research-rank/research-data.REALTIME."
18
- # 生产环境
19
- DATA_URL_BASE = "http://opencompass.oss-cn-shanghai.aliyuncs.com/assets/research-rank/research-data.REALTIME."
20
 
21
  def find_latest_data_url():
22
  """Find the latest available data URL by trying different dates."""
@@ -162,14 +160,6 @@ def create_interface():
162
  print(f"Error refreshing data: {e}")
163
  return None, None
164
 
165
- def auto_refresh():
166
- """Single refresh function for automatic updates"""
167
- title, data = refresh_data()
168
- status = f"Last auto update: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}"
169
- if title and data is not None:
170
- return title, data, status
171
- return None, None, None
172
-
173
  def update_table(size_ranges, model_types):
174
  if data_state.current_df is None:
175
  return empty_df
@@ -222,13 +212,6 @@ def create_interface():
222
  outputs=[title_comp, table, update_status],
223
  )
224
 
225
- # 添加自动更新功能
226
- demo.load(
227
- fn=auto_refresh,
228
- outputs=[title_comp, table, update_status],
229
- every=21600 # 每6小时尝试更新一次
230
- )
231
-
232
  size_filter.change(
233
  fn=update_table,
234
  inputs=[size_filter, type_filter],
 
13
  year={2023}
14
  }"""
15
  CITATION_BUTTON_LABEL = "Copy the following snippet to cite these results"
16
+ DATA_URL_BASE = "http://opencompass.oss-cn-shanghai.aliyuncs.com/dev-assets/research-rank/research-data.REALTIME."
17
+ # DATA_URL_BASE = "http://opencompass.oss-cn-shanghai.aliyuncs.com/assets/research-rank/research-data.REALTIME."
 
 
18
 
19
  def find_latest_data_url():
20
  """Find the latest available data URL by trying different dates."""
 
160
  print(f"Error refreshing data: {e}")
161
  return None, None
162
 
 
 
 
 
 
 
 
 
163
  def update_table(size_ranges, model_types):
164
  if data_state.current_df is None:
165
  return empty_df
 
212
  outputs=[title_comp, table, update_status],
213
  )
214
 
 
 
 
 
 
 
 
215
  size_filter.change(
216
  fn=update_table,
217
  inputs=[size_filter, type_filter],