hysts HF staff commited on
Commit
f7662a1
1 Parent(s): 0dbb9c8

Add the cartoon style image table

Browse files
Files changed (1) hide show
  1. app.py +12 -8
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'A demo for {repo_url}'
218
- article = None
 
 
 
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(0, 316, step=1, default=26, label='Style'),
 
228
  ],
229
  [
230
- gr.outputs.Image(type='pil', label='Aligned face'),
231
- gr.outputs.Image(type='pil', label='Style'),
232
  gr.outputs.Image(type='pil', label='Reconstructed'),
233
- gr.outputs.Image(type='pil', label='Gen 1'),
234
- gr.outputs.Image(type='pil', label='Gen 2'),
235
- gr.outputs.Image(type='pil', label='Gen 3'),
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 = '![cartoon style images](https://user-images.githubusercontent.com/18130694/159848447-96fa5194-32ec-42f0-945a-3b1958bf6e5e.jpg)'
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,