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=f
|
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=f
|
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=f
|
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=os.path.abspath(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,
|
|
|
140 |
pass
|
141 |
try:
|
142 |
api.upload_file(
|
143 |
+
path_or_fileobj=os.path.abspath(f"{uid}_star.png"),
|
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=os.path.abspath(f"{uid}_enemy.png"),
|
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,
|