Update app.py
Browse files
app.py
CHANGED
@@ -129,7 +129,7 @@ def save_game(name,score,background_im,star_im,enemy_im):
|
|
129 |
print(timestamp)
|
130 |
try:
|
131 |
api.upload_file(
|
132 |
-
path_or_fileobj=
|
133 |
path_in_repo=f"{save_data.split('main/',1)[1]}/images/background/{game}-background_img.png",
|
134 |
repo_id=save_data.split('datasets/',1)[1].split('/raw',1)[0],
|
135 |
token=token_self,
|
@@ -286,9 +286,9 @@ with gr.Blocks() as app:
|
|
286 |
url_params = gr.JSON({}, visible=True, label="")
|
287 |
acc=gr.Textbox()
|
288 |
with gr.Row():
|
289 |
-
hid_sky=gr.
|
290 |
-
hid_star=gr.
|
291 |
-
hid_enemy=gr.
|
292 |
|
293 |
def return_score(text):
|
294 |
return text
|
|
|
129 |
print(timestamp)
|
130 |
try:
|
131 |
api.upload_file(
|
132 |
+
path_or_fileobj=Image.open(f"{uid}_sky.png"),
|
133 |
path_in_repo=f"{save_data.split('main/',1)[1]}/images/background/{game}-background_img.png",
|
134 |
repo_id=save_data.split('datasets/',1)[1].split('/raw',1)[0],
|
135 |
token=token_self,
|
|
|
286 |
url_params = gr.JSON({}, visible=True, label="")
|
287 |
acc=gr.Textbox()
|
288 |
with gr.Row():
|
289 |
+
hid_sky=gr.Image(type='filepath')
|
290 |
+
hid_star=gr.Image(type='filepath')
|
291 |
+
hid_enemy=gr.Image(type='filepath')
|
292 |
|
293 |
def return_score(text):
|
294 |
return text
|