Omnibus commited on
Commit
811d7b4
1 Parent(s): 0ebfbb1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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,
@@ -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.Pil()
290
- hid_star=gr.Pil()
291
- hid_enemy=gr.Pil()
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