Spaces:
Runtime error
Runtime error
Younes Belkada
commited on
Commit
·
8279921
1
Parent(s):
d809cbf
Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,18 @@ MODEL_NAMES = [
|
|
23 |
'stylegan2_ffhq'
|
24 |
]
|
25 |
NB_IMG = 4
|
26 |
-
OUTPUT_LIST = [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
def tensor_to_pil(input_object):
|
29 |
"""Shows images in one figure."""
|
@@ -100,6 +111,7 @@ iface = gr.Interface(
|
|
100 |
],
|
101 |
outputs=OUTPUT_LIST,
|
102 |
layout="horizontal",
|
103 |
-
theme="peach"
|
|
|
104 |
)
|
105 |
iface.launch()
|
|
|
23 |
'stylegan2_ffhq'
|
24 |
]
|
25 |
NB_IMG = 4
|
26 |
+
OUTPUT_LIST = [
|
27 |
+
gr.outputs.Image(type="pil", label="Generated Image") for _ in range(NB_IMG)
|
28 |
+
] + [
|
29 |
+
gr.outputs.Image(type="pil", label="Modified Image") for _ in range(NB_IMG)
|
30 |
+
]
|
31 |
+
description = """
|
32 |
+
<p>
|
33 |
+
<center>
|
34 |
+
This is an interactive demo of the CVPR2020 InterfaceGAN paper, by adding other attributes such as Hat, Bald, etc. />
|
35 |
+
</center>
|
36 |
+
</p>
|
37 |
+
"""
|
38 |
|
39 |
def tensor_to_pil(input_object):
|
40 |
"""Shows images in one figure."""
|
|
|
111 |
],
|
112 |
outputs=OUTPUT_LIST,
|
113 |
layout="horizontal",
|
114 |
+
theme="peach",
|
115 |
+
description=description
|
116 |
)
|
117 |
iface.launch()
|