Update app.py
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ def predict(text, url_params):
|
|
31 |
print (load_game)
|
32 |
if load_game != None:
|
33 |
try:
|
34 |
-
r = requests.get(f'{save_data}
|
35 |
lod = json.loads(r.text)
|
36 |
#out_lod.append(lod)
|
37 |
print (lod)
|
@@ -285,7 +285,7 @@ with gr.Blocks() as app:
|
|
285 |
def return_score(text):
|
286 |
return text
|
287 |
get_score.click(return_score,score,[score],_js=score_js)
|
288 |
-
save_btn.click(save_game,[game_name,score,out_im_sky,out_im_star,out_im_enemy,out_im_enemy,out_im_enemy],message)
|
289 |
update_game.click(game_fn,[out_sky_url,out_star_url,out_enemy_url],html_game)
|
290 |
btn_sky.click(sky_fn,prompt_sky,[out_im_sky,out_sky_url])
|
291 |
btn_star.click(star_fn,prompt_star,[out_im_star,out_star_url])
|
|
|
31 |
print (load_game)
|
32 |
if load_game != None:
|
33 |
try:
|
34 |
+
r = requests.get(f'{save_data}games/{load_game}.omnigame')
|
35 |
lod = json.loads(r.text)
|
36 |
#out_lod.append(lod)
|
37 |
print (lod)
|
|
|
285 |
def return_score(text):
|
286 |
return text
|
287 |
get_score.click(return_score,score,[score],_js=score_js)
|
288 |
+
save_btn.click(return_score,score,[score],_js=score_js).then(save_game,[game_name,score,out_im_sky,out_im_star,out_im_enemy,out_im_enemy,out_im_enemy],message)
|
289 |
update_game.click(game_fn,[out_sky_url,out_star_url,out_enemy_url],html_game)
|
290 |
btn_sky.click(sky_fn,prompt_sky,[out_im_sky,out_sky_url])
|
291 |
btn_star.click(star_fn,prompt_star,[out_im_star,out_star_url])
|