Spaces:
Runtime error
Runtime error
Add the cartoon style image table
Browse files
app.py
CHANGED
|
@@ -214,8 +214,11 @@ def main():
|
|
| 214 |
|
| 215 |
repo_url = 'https://github.com/williamyang1991/DualStyleGAN'
|
| 216 |
title = 'williamyang1991/DualStyleGAN'
|
| 217 |
-
description = f
|
| 218 |
-
|
|
|
|
|
|
|
|
|
|
| 219 |
|
| 220 |
image_paths = sorted(pathlib.Path('images').glob('*'))
|
| 221 |
examples = [[path.as_posix(), 26] for path in image_paths]
|
|
@@ -224,15 +227,16 @@ def main():
|
|
| 224 |
func,
|
| 225 |
[
|
| 226 |
gr.inputs.Image(type='file', label='Image'),
|
| 227 |
-
gr.inputs.Slider(
|
|
|
|
| 228 |
],
|
| 229 |
[
|
| 230 |
-
gr.outputs.Image(type='pil', label='Aligned
|
| 231 |
-
gr.outputs.Image(type='pil', label='Style'),
|
| 232 |
gr.outputs.Image(type='pil', label='Reconstructed'),
|
| 233 |
-
gr.outputs.Image(type='pil', label='
|
| 234 |
-
gr.outputs.Image(type='pil', label='
|
| 235 |
-
gr.outputs.Image(type='pil', label='
|
| 236 |
],
|
| 237 |
examples=examples,
|
| 238 |
theme=args.theme,
|
|
|
|
| 214 |
|
| 215 |
repo_url = 'https://github.com/williamyang1991/DualStyleGAN'
|
| 216 |
title = 'williamyang1991/DualStyleGAN'
|
| 217 |
+
description = f"""A demo for {repo_url}
|
| 218 |
+
|
| 219 |
+
You can select style images from the table below.
|
| 220 |
+
"""
|
| 221 |
+
article = ''
|
| 222 |
|
| 223 |
image_paths = sorted(pathlib.Path('images').glob('*'))
|
| 224 |
examples = [[path.as_posix(), 26] for path in image_paths]
|
|
|
|
| 227 |
func,
|
| 228 |
[
|
| 229 |
gr.inputs.Image(type='file', label='Image'),
|
| 230 |
+
gr.inputs.Slider(
|
| 231 |
+
0, 316, step=1, default=26, label='Style Image Index'),
|
| 232 |
],
|
| 233 |
[
|
| 234 |
+
gr.outputs.Image(type='pil', label='Aligned Face'),
|
| 235 |
+
gr.outputs.Image(type='pil', label='Selected Style Image'),
|
| 236 |
gr.outputs.Image(type='pil', label='Reconstructed'),
|
| 237 |
+
gr.outputs.Image(type='pil', label='Result 1'),
|
| 238 |
+
gr.outputs.Image(type='pil', label='Result 2'),
|
| 239 |
+
gr.outputs.Image(type='pil', label='Result 3'),
|
| 240 |
],
|
| 241 |
examples=examples,
|
| 242 |
theme=args.theme,
|