hysts HF staff commited on
Commit
232e820
·
1 Parent(s): e107507
Files changed (1) hide show
  1. app.py +8 -10
app.py CHANGED
@@ -29,15 +29,15 @@ from model.encoder.psp import pSp
29
 
30
  ORIGINAL_REPO_URL = 'https://github.com/williamyang1991/DualStyleGAN'
31
  TITLE = 'williamyang1991/DualStyleGAN'
32
- DESCRIPTION = f"""This is a demo for {ORIGINAL_REPO_URL}.
33
 
34
  ![overview](https://raw.githubusercontent.com/williamyang1991/DualStyleGAN/main/doc_images/overview.jpg)
35
 
36
  You can select style images for each style type from the tables below.
37
  The style image index should be in the following range:
38
  (cartoon: 0-316, caricature: 0-198, anime: 0-173, arcane: 0-99, comic: 0-100, pixar: 0-121, slamdunk: 0-119)
39
- """
40
- ARTICLE = """## Style images
41
 
42
  Note that the style images here for Arcane, comic, Pixar, and Slamdunk are the reconstructed ones, not the original ones due to copyright issues.
43
 
@@ -61,7 +61,7 @@ Note that the style images here for Arcane, comic, Pixar, and Slamdunk are the r
61
 
62
  ### Slamdunk
63
  ![slamdunk style images](https://raw.githubusercontent.com/williamyang1991/DualStyleGAN/main/doc_images/Reconstruction_slamdunk_overview.jpg)
64
- """
65
 
66
  TOKEN = os.environ['TOKEN']
67
  MODEL_REPO = 'hysts/DualStyleGAN'
@@ -261,12 +261,10 @@ def main():
261
  func,
262
  [
263
  gr.inputs.Image(type='file', label='Input Image'),
264
- gr.inputs.Radio(
265
- style_types,
266
- type='value',
267
- default='cartoon',
268
- label='Style Type',
269
- ),
270
  gr.inputs.Number(default=26, label='Style Image Index'),
271
  gr.inputs.Slider(
272
  0, 1, step=0.1, default=0.6, label='Structure Weight'),
 
29
 
30
  ORIGINAL_REPO_URL = 'https://github.com/williamyang1991/DualStyleGAN'
31
  TITLE = 'williamyang1991/DualStyleGAN'
32
+ DESCRIPTION = f'''This is a demo for {ORIGINAL_REPO_URL}.
33
 
34
  ![overview](https://raw.githubusercontent.com/williamyang1991/DualStyleGAN/main/doc_images/overview.jpg)
35
 
36
  You can select style images for each style type from the tables below.
37
  The style image index should be in the following range:
38
  (cartoon: 0-316, caricature: 0-198, anime: 0-173, arcane: 0-99, comic: 0-100, pixar: 0-121, slamdunk: 0-119)
39
+ '''
40
+ ARTICLE = '''## Style images
41
 
42
  Note that the style images here for Arcane, comic, Pixar, and Slamdunk are the reconstructed ones, not the original ones due to copyright issues.
43
 
 
61
 
62
  ### Slamdunk
63
  ![slamdunk style images](https://raw.githubusercontent.com/williamyang1991/DualStyleGAN/main/doc_images/Reconstruction_slamdunk_overview.jpg)
64
+ '''
65
 
66
  TOKEN = os.environ['TOKEN']
67
  MODEL_REPO = 'hysts/DualStyleGAN'
 
261
  func,
262
  [
263
  gr.inputs.Image(type='file', label='Input Image'),
264
+ gr.inputs.Radio(style_types,
265
+ type='value',
266
+ default='cartoon',
267
+ label='Style Type'),
 
 
268
  gr.inputs.Number(default=26, label='Style Image Index'),
269
  gr.inputs.Slider(
270
  0, 1, step=0.1, default=0.6, label='Structure Weight'),