Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -26,25 +26,25 @@ face2paint = torch.hub.load(
|
|
26 |
)
|
27 |
|
28 |
def inference(img, ver):
|
29 |
-
if ver == '
|
30 |
out = face2paint(model2, img)
|
31 |
else:
|
32 |
out = face2paint(model1, img)
|
33 |
return out
|
34 |
|
35 |
title = "AnimeGANv2"
|
36 |
-
description = "
|
37 |
-
article = "<p style='text-align: center'><a href='https://github.com/bryandlee/animegan2-pytorch' target='_blank'>Github
|
38 |
|
39 |
gr.Interface(
|
40 |
fn=inference,
|
41 |
inputs=[
|
42 |
gr.inputs.Image(type="pil"),
|
43 |
gr.inputs.Radio(
|
44 |
-
['
|
45 |
type="value",
|
46 |
-
default='
|
47 |
-
label='
|
48 |
)
|
49 |
],
|
50 |
outputs=gr.outputs.Image(type="pil"),
|
|
|
26 |
)
|
27 |
|
28 |
def inference(img, ver):
|
29 |
+
if ver == 'versão 2 (🔺 robustez, 🔻 estilização)':
|
30 |
out = face2paint(model2, img)
|
31 |
else:
|
32 |
out = face2paint(model1, img)
|
33 |
return out
|
34 |
|
35 |
title = "AnimeGANv2"
|
36 |
+
description = "Demonstração do AnimeGanv2 para retratos de rostos. Para usá-lo, simplesmente faça o upload da sua imagem."
|
37 |
+
article = "<p style='text-align: center'><a href='https://github.com/bryandlee/animegan2-pytorch' target='_blank'>Repositório do Github Pytorch</a></p> <center><img src='https://visitor-badge.glitch.me/badge?page_id=akhaliq_animegan' alt='insígnia de visitantes'></center></p>"
|
38 |
|
39 |
gr.Interface(
|
40 |
fn=inference,
|
41 |
inputs=[
|
42 |
gr.inputs.Image(type="pil"),
|
43 |
gr.inputs.Radio(
|
44 |
+
['versão 1 (🔺 estilização, 🔻 robustez)', 'versão 2 (🔺 robustez, 🔻 estilização)'],
|
45 |
type="value",
|
46 |
+
default='versão 2 (🔺 robustez, 🔻 estilização)',
|
47 |
+
label='versão'
|
48 |
)
|
49 |
],
|
50 |
outputs=gr.outputs.Image(type="pil"),
|