Update app.py
Browse files
app.py
CHANGED
@@ -352,11 +352,12 @@ with gr.Blocks() as app:
|
|
352 |
get_high_score_btn=gr.Button()
|
353 |
def return_score(text):
|
354 |
return text
|
355 |
-
|
|
|
356 |
get_high_score_btn.click(get_high_score,None,score_html)
|
357 |
get_score.click(return_score,score,[score],_js=score_js)
|
358 |
save_btn.click(return_score,score,[score],_js=score_js).then(save_game,[game_name,score,out_sky_url,out_star_url,out_enemy_url],message)
|
359 |
-
update_game.click(game_fn,[out_sky_url,out_star_url,out_enemy_url],html_game).then(get_high_score,None,score_html)
|
360 |
btn_sky.click(sky_fn,prompt_sky,[out_im_sky,out_sky_url])
|
361 |
btn_star.click(star_fn,prompt_star,[out_im_star,out_star_url])
|
362 |
btn_enemy.click(enemy_fn,prompt_enemy,[out_im_enemy,out_enemy_url])
|
|
|
352 |
get_high_score_btn=gr.Button()
|
353 |
def return_score(text):
|
354 |
return text
|
355 |
+
def refresh_frame():
|
356 |
+
return None
|
357 |
get_high_score_btn.click(get_high_score,None,score_html)
|
358 |
get_score.click(return_score,score,[score],_js=score_js)
|
359 |
save_btn.click(return_score,score,[score],_js=score_js).then(save_game,[game_name,score,out_sky_url,out_star_url,out_enemy_url],message)
|
360 |
+
update_game.click(refresh_frame,None,html_game).then(game_fn,[out_sky_url,out_star_url,out_enemy_url],html_game).then(get_high_score,None,score_html)
|
361 |
btn_sky.click(sky_fn,prompt_sky,[out_im_sky,out_sky_url])
|
362 |
btn_star.click(star_fn,prompt_star,[out_im_star,out_star_url])
|
363 |
btn_enemy.click(enemy_fn,prompt_enemy,[out_im_enemy,out_enemy_url])
|