Commit
•
0fd6c86
1
Parent(s):
5dac6c6
Update app.py
Browse files
app.py
CHANGED
@@ -345,13 +345,7 @@ with block:
|
|
345 |
search_btn.click(fn=filter_data, inputs=[env, grpath, user_id], outputs=gr_dataframe, api_name="filter_data")
|
346 |
reset_btn.click(fn=get_data, inputs=[env, grpath], outputs=gr_dataframe, api_name="get_data")
|
347 |
|
348 |
-
|
349 |
-
# Refresh every hour
|
350 |
-
scheduler.add_job(func=run_update_dataset, trigger="interval", seconds=3600)
|
351 |
-
scheduler.add_job(download_leaderboard_dataset, 'interval', seconds=3600)
|
352 |
-
scheduler.start()
|
353 |
-
|
354 |
-
block.load(
|
355 |
download_leaderboard_dataset,
|
356 |
inputs=[],
|
357 |
outputs=[
|
@@ -359,6 +353,14 @@ block.load(
|
|
359 |
],
|
360 |
)
|
361 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
362 |
block.launch()
|
363 |
|
364 |
|
|
|
345 |
search_btn.click(fn=filter_data, inputs=[env, grpath, user_id], outputs=gr_dataframe, api_name="filter_data")
|
346 |
reset_btn.click(fn=get_data, inputs=[env, grpath], outputs=gr_dataframe, api_name="get_data")
|
347 |
|
348 |
+
block.load(
|
|
|
|
|
|
|
|
|
|
|
|
|
349 |
download_leaderboard_dataset,
|
350 |
inputs=[],
|
351 |
outputs=[
|
|
|
353 |
],
|
354 |
)
|
355 |
|
356 |
+
scheduler = BackgroundScheduler()
|
357 |
+
# Refresh every hour
|
358 |
+
scheduler.add_job(func=run_update_dataset, trigger="interval", seconds=3600)
|
359 |
+
scheduler.add_job(download_leaderboard_dataset, 'interval', seconds=3600)
|
360 |
+
scheduler.start()
|
361 |
+
|
362 |
+
|
363 |
+
|
364 |
block.launch()
|
365 |
|
366 |
|