chrisjay commited on
Commit
92334e0
β€’
1 Parent(s): f88c021

show updating leaderboard notification

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -198,6 +198,12 @@ def reload_all_data():
198
  for rl_env in RL_ENVS:
199
  RL_DETAILS[rl_env]['data'] = update_data_per_env(rl_env)
200
 
 
 
 
 
 
 
201
 
202
  def reload_leaderboard(rl_env):
203
  global RL_DETAILS
@@ -221,7 +227,11 @@ RL_DETAILS ={'CarRacing-v0':{'title':" The Car Racing 🏎️ Leaderboard πŸš€",
221
 
222
  block = gr.Blocks(css=BLOCK_CSS)
223
  with block:
224
- block.load(reload_all_data,[],[])
 
 
 
 
225
 
226
  with gr.Tabs():
227
  for rl_env in RL_ENVS:
 
198
  for rl_env in RL_ENVS:
199
  RL_DETAILS[rl_env]['data'] = update_data_per_env(rl_env)
200
 
201
+ html = """<div style="color: green">
202
+ <p> βœ… Leaderboard updated! Click `Reload Leaderboard` to see the current leaderboard.</p>
203
+ </div>
204
+ """
205
+ return html
206
+
207
 
208
  def reload_leaderboard(rl_env):
209
  global RL_DETAILS
 
227
 
228
  block = gr.Blocks(css=BLOCK_CSS)
229
  with block:
230
+ notification = gr.HTML("""<div style="color: green">
231
+ <p> βŒ› Updating leaderboard... </p>
232
+ </div>
233
+ """)
234
+ block.load(reload_all_data,[],[notification])
235
 
236
  with gr.Tabs():
237
  for rl_env in RL_ENVS: