Spaces:
Runtime error
Runtime error
Commit
•
033cd3f
1
Parent(s):
3df55a5
Update app.py
Browse files
app.py
CHANGED
@@ -62,9 +62,9 @@ with gr.Blocks() as demo:
|
|
62 |
btn = gr.Button("Get the haircut")
|
63 |
output = gr.Image(label="Your result")
|
64 |
gr.Examples(examples=[["michael_cera-min.png", "leo_square-min.png", "pink_hair_celeb-min.png"]], inputs=[source, target_1, target_2], outputs=output)
|
65 |
-
source.upload(fn=resize,
|
66 |
-
target_1.upload(fn=resize,
|
67 |
-
target_2.upload(fn=resize,
|
68 |
btn.click(fn=swap_hair, inputs=[source, target_1, target_2], outputs=[output])
|
69 |
|
70 |
demo.launch()
|
|
|
62 |
btn = gr.Button("Get the haircut")
|
63 |
output = gr.Image(label="Your result")
|
64 |
gr.Examples(examples=[["michael_cera-min.png", "leo_square-min.png", "pink_hair_celeb-min.png"]], inputs=[source, target_1, target_2], outputs=output)
|
65 |
+
source.upload(fn=resize, inputs=source, outputs=source)
|
66 |
+
target_1.upload(fn=resize, inputs=target_1, outputs=target_1)
|
67 |
+
target_2.upload(fn=resize, inputs=target_2, outputs=target_2)
|
68 |
btn.click(fn=swap_hair, inputs=[source, target_1, target_2], outputs=[output])
|
69 |
|
70 |
demo.launch()
|