ldkong commited on
Commit
136c53f
β€’
1 Parent(s): 03888cd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -48,7 +48,7 @@ def display_image(file_name):
48
  imageio.imwrite('image.png', image)
49
 
50
 
51
- def path(action, body, hair, top, bottom):
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
- path,
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="image",
 
 
 
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()