broadfield commited on
Commit
61101c1
·
verified ·
1 Parent(s): db646eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -57,6 +57,8 @@ def save_data(t,m,l,n,w,p):
57
 
58
  title = t.replace('https://',"").replace('/',"_").replace('.',"_")
59
  im = mi.run_1(name=title,img_size=[256,256])
 
 
60
  im2=f"https://{user_name}-{repo_name}.static.hf.space/images/{title}_prob.png"
61
  #im3=f"{make_im.root}/images/{name}_prob.png"
62
  #uid=uuid.uuid4()
@@ -76,7 +78,7 @@ def save_data(t,m,l,n,w,p):
76
  repo_type="space",
77
  )
78
  api.upload_file(
79
- path_or_fileobj=im2,
80
  path_in_repo=f"/images/{out_name}.png",
81
  repo_id=f'{user_name}/{repo_name}',
82
  token=token,
 
57
 
58
  title = t.replace('https://',"").replace('/',"_").replace('.',"_")
59
  im = mi.run_1(name=title,img_size=[256,256])
60
+
61
+ im1 = f"{os.getcwd()}/images/{name}_prob.png"
62
  im2=f"https://{user_name}-{repo_name}.static.hf.space/images/{title}_prob.png"
63
  #im3=f"{make_im.root}/images/{name}_prob.png"
64
  #uid=uuid.uuid4()
 
78
  repo_type="space",
79
  )
80
  api.upload_file(
81
+ path_or_fileobj=im1,
82
  path_in_repo=f"/images/{out_name}.png",
83
  repo_id=f'{user_name}/{repo_name}',
84
  token=token,