show updating leaderboard notification
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
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:
|