Spaces:
Runtime error
Runtime error
Commit
•
8f25566
1
Parent(s):
2c0b1b4
Update app.py
Browse files
app.py
CHANGED
@@ -342,23 +342,13 @@ with block:
|
|
342 |
with gr.Row():
|
343 |
search_btn.click(fn=filter_data, inputs=[env, grpath, user_id], outputs=gr_dataframe, api_name="filter_data")
|
344 |
reset_btn.click(fn=get_data, inputs=[env, grpath], outputs=gr_dataframe, api_name="get_data")
|
345 |
-
|
346 |
-
block.launch()
|
347 |
-
|
348 |
-
def refresh_leaderboard():
|
349 |
-
"""
|
350 |
-
Here we refresh the leaderboard:
|
351 |
-
we update the rl_env["global"] for each rl_envs in rl_env
|
352 |
-
"""
|
353 |
-
for i in range(0, len(rl_envs)):
|
354 |
-
rl_env = rl_envs[i]
|
355 |
-
temp = get_model_dataframe(rl_env)
|
356 |
-
rl_env["global"] = temp
|
357 |
-
print("The leaderboard has been updated")
|
358 |
-
|
359 |
-
block.launch()
|
360 |
|
361 |
scheduler = BackgroundScheduler()
|
362 |
# Refresh every hour
|
363 |
scheduler.add_job(func=run_update_dataset, trigger="interval", seconds=3600)
|
364 |
-
scheduler.start()
|
|
|
|
|
|
|
|
|
|
|
|
342 |
with gr.Row():
|
343 |
search_btn.click(fn=filter_data, inputs=[env, grpath, user_id], outputs=gr_dataframe, api_name="filter_data")
|
344 |
reset_btn.click(fn=get_data, inputs=[env, grpath], outputs=gr_dataframe, api_name="get_data")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
345 |
|
346 |
scheduler = BackgroundScheduler()
|
347 |
# Refresh every hour
|
348 |
scheduler.add_job(func=run_update_dataset, trigger="interval", seconds=3600)
|
349 |
+
scheduler.start()
|
350 |
+
|
351 |
+
block.launch()
|
352 |
+
|
353 |
+
|
354 |
+
|