broadfield commited on
Commit
decd3ba
·
verified ·
1 Parent(s): 0cc7ca5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -53,8 +53,9 @@ def load_data(file):
53
  return(lod)
54
 
55
  def save_data(t,m,l,n,w,p):
56
- im = make_im.run_1(img_size=[256,256])
57
  title = t.replace('https://',"").replace('/',"_").replace('.',"_")
 
 
58
  #uid=uuid.uuid4()
59
  with open('template.html','r') as file:
60
  file_cont=file.read()
@@ -64,6 +65,7 @@ def save_data(t,m,l,n,w,p):
64
  buffer.write(file_out.encode())
65
  buffer.seek(0)
66
  rand = random.randint(1000,9999)
 
67
  api.upload_file(
68
  path_or_fileobj=buffer,
69
  path_in_repo=f"{title}_{rand}.html",
 
53
  return(lod)
54
 
55
  def save_data(t,m,l,n,w,p):
 
56
  title = t.replace('https://',"").replace('/',"_").replace('.',"_")
57
+ im = make_im.run_1(name=title,img_size=[256,256])
58
+ im=f"https://broadfield-a.static.hf.space/file={title}.png"
59
  #uid=uuid.uuid4()
60
  with open('template.html','r') as file:
61
  file_cont=file.read()
 
65
  buffer.write(file_out.encode())
66
  buffer.seek(0)
67
  rand = random.randint(1000,9999)
68
+ "https://huggingface.co/spaces/Omnibus/game-test/resolve/main/assets/sky.png"
69
  api.upload_file(
70
  path_or_fileobj=buffer,
71
  path_in_repo=f"{title}_{rand}.html",