Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -244,3 +244,34 @@ with gr.Blocks(css=css) as Tryon:
|
|
244 |
|
245 |
# try_button.click(fn=start_tryon, inputs=[imgs, garm_img, seed, randomize_seed], outputs=[image_out, seed_used, result_info], api_name='tryon',concurrency_limit=10)
|
246 |
test_button.click(fn=tryon, inputs=[imgs, garm_img, seed, randomize_seed], outputs=[image_out, seed_used, result_info], api_name=False, concurrency_limit=45)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
|
245 |
# try_button.click(fn=start_tryon, inputs=[imgs, garm_img, seed, randomize_seed], outputs=[image_out, seed_used, result_info], api_name='tryon',concurrency_limit=10)
|
246 |
test_button.click(fn=tryon, inputs=[imgs, garm_img, seed, randomize_seed], outputs=[image_out, seed_used, result_info], api_name=False, concurrency_limit=45)
|
247 |
+
with gr.Row():
|
248 |
+
seed_used = gr.Number(label="Seed used")
|
249 |
+
result_info = gr.Text(label="Response")
|
250 |
+
# try_button = gr.Button(value="Run", elem_id="button")
|
251 |
+
test_button = gr.Button(value="Run", elem_id="button")
|
252 |
+
|
253 |
+
|
254 |
+
# try_button.click(fn=start_tryon, inputs=[imgs, garm_img, seed, randomize_seed], outputs=[image_out, seed_used, result_info], api_name='tryon',concurrency_limit=10)
|
255 |
+
test_button.click(fn=tryon, inputs=[imgs, garm_img, seed, randomize_seed], outputs=[image_out, seed_used, result_info], api_name=False, concurrency_limit=45)
|
256 |
+
|
257 |
+
with gr.Column(elem_id = "col-showcase"):
|
258 |
+
gr.HTML("""
|
259 |
+
<div style="display: flex; justify-content: center; align-items: center; text-align: center; font-size: 20px;">
|
260 |
+
<div> </div>
|
261 |
+
<br>
|
262 |
+
<div>
|
263 |
+
Virtual try-on examples in pairs of person and garment images
|
264 |
+
</div>
|
265 |
+
</div>
|
266 |
+
""")
|
267 |
+
show_case = gr.Examples(
|
268 |
+
examples=[
|
269 |
+
["assets/examples/model2.png", "assets/examples/garment2.png", "assets/examples/result2.png"],
|
270 |
+
["assets/examples/model3.png", "assets/examples/garment3.png", "assets/examples/result3.png"],
|
271 |
+
["assets/examples/model1.png", "assets/examples/garment1.png", "assets/examples/result1.png"],
|
272 |
+
],
|
273 |
+
inputs=[imgs, garm_img, image_out],
|
274 |
+
label=None
|
275 |
+
)
|
276 |
+
|
277 |
+
Tryon.queue(api_open=False).launch(show_api=False)
|