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=background_im,
|
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,
|
@@ -140,7 +140,7 @@ def save_game(name,score,background_im,star_im,enemy_im):
|
|
140 |
pass
|
141 |
try:
|
142 |
api.upload_file(
|
143 |
-
path_or_fileobj=star_im,
|
144 |
path_in_repo=f"{save_data.split('main/',1)[1]}/images/star/{game}-star_img.png",
|
145 |
repo_id=save_data.split('datasets/',1)[1].split('/raw',1)[0],
|
146 |
token=token_self,
|
@@ -151,7 +151,7 @@ def save_game(name,score,background_im,star_im,enemy_im):
|
|
151 |
pass
|
152 |
try:
|
153 |
api.upload_file(
|
154 |
-
path_or_fileobj=enemy_im,
|
155 |
path_in_repo=f"{save_data.split('main/',1)[1]}/images/enemy/{game}-enemy_img.png",
|
156 |
repo_id=save_data.split('datasets/',1)[1].split('/raw',1)[0],
|
157 |
token=token_self,
|
|
|
129 |
print(timestamp)
|
130 |
try:
|
131 |
api.upload_file(
|
132 |
+
path_or_fileobj=f'{background_im}',
|
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,
|
|
|
140 |
pass
|
141 |
try:
|
142 |
api.upload_file(
|
143 |
+
path_or_fileobj=f'{star_im}',
|
144 |
path_in_repo=f"{save_data.split('main/',1)[1]}/images/star/{game}-star_img.png",
|
145 |
repo_id=save_data.split('datasets/',1)[1].split('/raw',1)[0],
|
146 |
token=token_self,
|
|
|
151 |
pass
|
152 |
try:
|
153 |
api.upload_file(
|
154 |
+
path_or_fileobj=f'{enemy_im}',
|
155 |
path_in_repo=f"{save_data.split('main/',1)[1]}/images/enemy/{game}-enemy_img.png",
|
156 |
repo_id=save_data.split('datasets/',1)[1].split('/raw',1)[0],
|
157 |
token=token_self,
|