Update app.py
Browse files
app.py
CHANGED
@@ -138,9 +138,11 @@ def save_game(name,score,background_im,star_im,enemy_im):
|
|
138 |
except Exception as e:
|
139 |
print (e)
|
140 |
pass
|
|
|
|
|
141 |
try:
|
142 |
api.upload_file(
|
143 |
-
path_or_fileobj=Image.open(
|
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,
|
|
|
138 |
except Exception as e:
|
139 |
print (e)
|
140 |
pass
|
141 |
+
|
142 |
+
star_out=open(star_im,'rb')
|
143 |
try:
|
144 |
api.upload_file(
|
145 |
+
path_or_fileobj=Image.open(star_out),
|
146 |
path_in_repo=f"{save_data.split('main/',1)[1]}/images/star/{game}-star_img.png",
|
147 |
repo_id=save_data.split('datasets/',1)[1].split('/raw',1)[0],
|
148 |
token=token_self,
|