Spaces:
Runtime error
Runtime error
Logan Zoellner
commited on
Commit
•
6c25c70
1
Parent(s):
3636771
default psi
Browse files
app.py
CHANGED
@@ -10,7 +10,11 @@ import numpy as np
|
|
10 |
|
11 |
def generate_image(seed,psi):
|
12 |
iface = gr.Interface.load("spaces/hysts/StyleGAN-Human")
|
13 |
-
|
|
|
|
|
|
|
|
|
14 |
#wrong format, gah! convert to numpy array
|
15 |
header, encoded = img.split(",", 1)
|
16 |
data = b64decode(encoded)
|
@@ -44,7 +48,7 @@ with demo:
|
|
44 |
|
45 |
with gr.Row():
|
46 |
seed=gr.Number(default=0, label='Seed')
|
47 |
-
psi=gr.Slider(0, 2, step=0.05, default=0.7, label='Truncation psi')
|
48 |
#outputImage = gr.Image(label="portrait",type="filepath", shape=(256,256))
|
49 |
output_image = gr.outputs.Image(type="filepath", label='Output')
|
50 |
model = gr.Model3D(clear_color=[0.0, 0.0, 0.0, 0.0], label="3D Model")
|
|
|
10 |
|
11 |
def generate_image(seed,psi):
|
12 |
iface = gr.Interface.load("spaces/hysts/StyleGAN-Human")
|
13 |
+
|
14 |
+
print("calling interface",seed,psi)
|
15 |
+
img=iface(seed,psi)
|
16 |
+
|
17 |
+
#img=iface.fns[0].fn(seed,psi)
|
18 |
#wrong format, gah! convert to numpy array
|
19 |
header, encoded = img.split(",", 1)
|
20 |
data = b64decode(encoded)
|
|
|
48 |
|
49 |
with gr.Row():
|
50 |
seed=gr.Number(default=0, label='Seed')
|
51 |
+
psi=gr.inputs.Slider(0, 2, step=0.05, default=0.7, label='Truncation psi')
|
52 |
#outputImage = gr.Image(label="portrait",type="filepath", shape=(256,256))
|
53 |
output_image = gr.outputs.Image(type="filepath", label='Output')
|
54 |
model = gr.Model3D(clear_color=[0.0, 0.0, 0.0, 0.0], label="3D Model")
|