echolee commited on
Commit
551fc01
1 Parent(s): 19d1db8
Files changed (9) hide show
  1. README.md +1 -1
  2. app.py +18 -8
  3. beyonce.jpeg +0 -0
  4. bill.png +0 -0
  5. billie.png +0 -0
  6. gongyoo.jpeg +0 -0
  7. groot.jpeg +0 -0
  8. tony.png +0 -0
  9. will.png +0 -0
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- title: AnimeGANv2
3
  emoji: ⚡
4
  colorFrom: yellow
5
  colorTo: blue
1
  ---
2
+ title: Face Anime For You
3
  emoji: ⚡
4
  colorFrom: yellow
5
  colorTo: blue
app.py CHANGED
@@ -24,14 +24,24 @@ def inference(img, ver):
24
  out = face2paint(model1, img)
25
  return out
26
 
27
- title = "Face Trans For You"
28
  description = "Online Demo for AnimeGanv2 Face Portrait v2. To use it, simply upload your image, or click one of the examples to load them. Please use a cropped portrait picture for best results similar to the examples below."
29
- # article = "<p style='text-align: center'><a href='https://github.com/bryandlee/animegan2-pytorch' target='_blank'>Github Repo Pytorch</a> | <a href='https://github.com/Kazuhito00/AnimeGANv2-ONNX-Sample' target='_blank'>Github Repo ONNX</a></p><p style='text-align: center'>samples from repo: <img src='https://user-images.githubusercontent.com/26464535/129888683-98bb6283-7bb8-4d1a-a04a-e795f5858dcf.gif' alt='animation'/> <img src='https://user-images.githubusercontent.com/26464535/137619176-59620b59-4e20-4d98-9559-a424f86b7f24.jpg' alt='animation'/></p>"
30
- # article = "<p style='text-align: center'>samples: <img src='https://user-images.githubusercontent.com/26464535/129888683-98bb6283-7bb8-4d1a-a04a-e795f5858dcf.gif' alt='animation'/> <img src='https://user-images.githubusercontent.com/26464535/137619176-59620b59-4e20-4d98-9559-a424f86b7f24.jpg' alt='animation'/></p>"
31
  article = "<p style='text-align: center'>❤ from Bruce</p>"
 
 
32
 
33
- img_musk = Image.open(requests.get("https://z3.ax1x.com/2021/11/22/IxVvz4.png", stream=True).raw).convert("RGB")
34
- examples = [[img_musk, 'version 2 (🔺 robustness,🔻 stylization)'],
35
- ['IU.png', 'version 1 (🔺 stylization, 🔻 robustness)']]
36
- gr.Interface(inference, [gr.inputs.Image(type="pil"), gr.inputs.Radio(['version 1 (🔺 stylization, 🔻 robustness)', 'version 2 (🔺 robustness,🔻 stylization)'], type="value", default='version 2 (🔺 robustness,🔻 stylization)', label='version')
37
- ], gr.outputs.Image(type="pil"), title=title, description=description, article=article, enable_queue=True, examples=examples, allow_flagging=False).launch()
 
 
 
 
 
 
 
 
 
 
24
  out = face2paint(model1, img)
25
  return out
26
 
27
+ title = "Face Anime For You"
28
  description = "Online Demo for AnimeGanv2 Face Portrait v2. To use it, simply upload your image, or click one of the examples to load them. Please use a cropped portrait picture for best results similar to the examples below."
 
 
29
  article = "<p style='text-align: center'>❤ from Bruce</p>"
30
+ examples = [['IU.png', 'version 2 (🔺 robustness,🔻 stylization)'],
31
+ ['elon.png', 'version 2 (🔺 robustness,🔻 stylization)']]
32
 
33
+ gr.Interface(inference,
34
+ [gr.inputs.Image(type="pil"), gr.inputs.Radio(
35
+ ['version 1 (🔺 stylization, 🔻 robustness)',
36
+ 'version 2 (🔺 robustness,🔻 stylization)'],
37
+ type="value",
38
+ default='version 2 (🔺 robustness,🔻 stylization)',
39
+ label='version')
40
+ ],
41
+ gr.outputs.Image(type="pil"),
42
+ title=title,
43
+ description=description,
44
+ article=article,
45
+ enable_queue=True,
46
+ examples=examples,
47
+ allow_flagging=False).launch()
beyonce.jpeg DELETED
Binary file (272 kB)
bill.png DELETED
Binary file (211 kB)
billie.png DELETED
Binary file (248 kB)
gongyoo.jpeg DELETED
Binary file (18.1 kB)
groot.jpeg DELETED
Binary file (350 kB)
tony.png DELETED
Binary file (357 kB)
will.png DELETED
Binary file (1.23 MB)