Omnibus commited on
Commit
cd28cca
1 Parent(s): deda5ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -153,7 +153,8 @@ def save_game(name,score):
153
  print (e)
154
  pass
155
  try:
156
- platform.save(f"{uid}_platform.png")
 
157
  api.upload_file(
158
  path_or_fileobj=f"{uid}_platform.png",
159
  path_in_repo=f"{save_data.split('main/',1)[1]}/images/platform/{game}-platform_img.png",
@@ -165,11 +166,12 @@ def save_game(name,score):
165
  print (e)
166
  pass
167
  try:
168
- dude.save(f"{uid}_dude.png")
 
169
 
170
  api.upload_file(
171
  path_or_fileobj=f"{uid}_dude.png",
172
- path_in_repo=f"{save_data.split('main/',1)[1]}/images/enemy/{game}-dude_img.png",
173
  repo_id=save_data.split('datasets/',1)[1].split('/raw',1)[0],
174
  token=token_self,
175
  repo_type="dataset",
 
153
  print (e)
154
  pass
155
  try:
156
+ platform_out=Image.open(platform)
157
+ platform_out.save(f"{uid}_platform.png")
158
  api.upload_file(
159
  path_or_fileobj=f"{uid}_platform.png",
160
  path_in_repo=f"{save_data.split('main/',1)[1]}/images/platform/{game}-platform_img.png",
 
166
  print (e)
167
  pass
168
  try:
169
+ dude_out=Image.open(dude)
170
+ dude_out.save(f"{uid}_dude.png")
171
 
172
  api.upload_file(
173
  path_or_fileobj=f"{uid}_dude.png",
174
+ path_in_repo=f"{save_data.split('main/',1)[1]}/images/dude/{game}-dude_img.png",
175
  repo_id=save_data.split('datasets/',1)[1].split('/raw',1)[0],
176
  token=token_self,
177
  repo_type="dataset",