Update app.py
Browse files
app.py
CHANGED
|
@@ -48,7 +48,7 @@ def display_image(file_name):
|
|
| 48 |
imageio.imwrite('image.png', image)
|
| 49 |
|
| 50 |
|
| 51 |
-
def
|
| 52 |
|
| 53 |
# body
|
| 54 |
if body == "human": body = '0'
|
|
@@ -77,11 +77,11 @@ def path(action, body, hair, top, bottom):
|
|
| 77 |
|
| 78 |
gif = display_image(name)
|
| 79 |
|
| 80 |
-
return 'image.png'
|
| 81 |
|
| 82 |
|
| 83 |
gr.Interface(
|
| 84 |
-
|
| 85 |
inputs=[
|
| 86 |
gr.Radio(choices=["shoot", "slash", "spellcard", "thrust", "walk"], value="shoot"),
|
| 87 |
gr.Radio(choices=["human", "alien"], value="human"),
|
|
@@ -89,6 +89,10 @@ gr.Interface(
|
|
| 89 |
gr.Radio(choices=["brown", "blue", "white"], value="brown"),
|
| 90 |
gr.Radio(choices=["white", "golden", "red", "silver"], value="white"),
|
| 91 |
],
|
| 92 |
-
outputs=
|
|
|
|
|
|
|
|
|
|
| 93 |
live=False,
|
|
|
|
| 94 |
).launch()
|
|
|
|
| 48 |
imageio.imwrite('image.png', image)
|
| 49 |
|
| 50 |
|
| 51 |
+
def run(action, body, hair, top, bottom):
|
| 52 |
|
| 53 |
# body
|
| 54 |
if body == "human": body = '0'
|
|
|
|
| 77 |
|
| 78 |
gif = display_image(name)
|
| 79 |
|
| 80 |
+
return 'image.png', 'image.png'
|
| 81 |
|
| 82 |
|
| 83 |
gr.Interface(
|
| 84 |
+
run,
|
| 85 |
inputs=[
|
| 86 |
gr.Radio(choices=["shoot", "slash", "spellcard", "thrust", "walk"], value="shoot"),
|
| 87 |
gr.Radio(choices=["human", "alien"], value="human"),
|
|
|
|
| 89 |
gr.Radio(choices=["brown", "blue", "white"], value="brown"),
|
| 90 |
gr.Radio(choices=["white", "golden", "red", "silver"], value="white"),
|
| 91 |
],
|
| 92 |
+
outputs=[
|
| 93 |
+
gr.components.Image(type="file", label="Avatar (Source)"),
|
| 94 |
+
gr.components.Image(type="file", label="Avatar (Target)")
|
| 95 |
+
],
|
| 96 |
live=False,
|
| 97 |
+
title="TransferVAE",
|
| 98 |
).launch()
|