Logan Zoellner commited on
Commit
6139d88
1 Parent(s): 2faa06c
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -10,22 +10,18 @@ import numpy as np
10
 
11
  def generate_image(seed,psi):
12
  iface = gr.Interface.load("spaces/hysts/StyleGAN-Human")
13
- print(iface.blocks,iface.children,iface.fns)
14
  img=iface.fns[0].fn(seed,psi)
15
-
16
  #wrong format, gah! convert to numpy array
17
  header, encoded = img.split(",", 1)
18
  data = b64decode(encoded)
19
  image = Image.open(io.BytesIO(data))
20
  image_np = np.array(image)
21
-
22
- print('got img',img)
23
-
24
  return image_np
25
 
26
  def generate_model(img):
27
  iface = gr.Interface.load("spaces/nagolinc/styleGanHuman_and_PIFu")
28
- model,file=iface.fns[0].fn(img)
 
29
  return model,file
30
 
31
 
 
10
 
11
  def generate_image(seed,psi):
12
  iface = gr.Interface.load("spaces/hysts/StyleGAN-Human")
 
13
  img=iface.fns[0].fn(seed,psi)
 
14
  #wrong format, gah! convert to numpy array
15
  header, encoded = img.split(",", 1)
16
  data = b64decode(encoded)
17
  image = Image.open(io.BytesIO(data))
18
  image_np = np.array(image)
 
 
 
19
  return image_np
20
 
21
  def generate_model(img):
22
  iface = gr.Interface.load("spaces/nagolinc/styleGanHuman_and_PIFu")
23
+ result=iface.fns[0].fn(img)
24
+ print(result)
25
  return model,file
26
 
27