Spaces:
Sleeping
Sleeping
Update app-backup.py
Browse files- app-backup.py +17 -16
app-backup.py
CHANGED
@@ -373,25 +373,26 @@ with gr.Blocks(theme="Yntec/HaleyCH_Theme_Orange") as app:
|
|
373 |
label="Style Transfer Strength"
|
374 |
)
|
375 |
generate_btn = gr.Button("Generate Try-On")
|
376 |
-
|
377 |
-
gr.Examples(
|
378 |
-
examples=examples,
|
379 |
-
inputs=[prompt_input, structure_image, style_image, depth_strength, style_strength],
|
380 |
-
outputs=[output_image],
|
381 |
-
fn=generate_image,
|
382 |
-
cache_examples=True,
|
383 |
-
cache_mode="lazy"
|
384 |
-
)
|
385 |
|
386 |
with gr.Column():
|
387 |
-
output_image.
|
388 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
389 |
|
390 |
generate_btn.click(
|
391 |
fn=generate_image,
|
392 |
inputs=[prompt_input, structure_image, style_image, depth_strength, style_strength],
|
393 |
-
outputs=
|
394 |
-
)
|
395 |
-
|
396 |
-
if __name__ == "__main__":
|
397 |
-
app.launch(share=True)
|
|
|
373 |
label="Style Transfer Strength"
|
374 |
)
|
375 |
generate_btn = gr.Button("Generate Try-On")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
376 |
|
377 |
with gr.Column():
|
378 |
+
output_image = gr.Image(label="Virtual Try-On Result")
|
379 |
+
|
380 |
+
# Examples ์น์
์ Row ๋ฐ์ผ๋ก ์ด๋ํ๊ณ ์์
|
381 |
+
gr.Examples(
|
382 |
+
examples=[
|
383 |
+
["person wearing fashionable clothing", "f1.webp", "f11.webp", 15, 0.6],
|
384 |
+
["person wearing elegant dress", "f2.webp", "f21.webp", 15, 0.5],
|
385 |
+
["person wearing casual outfit", "f3.webp", "f31.webp", 15, 0.5],
|
386 |
+
],
|
387 |
+
inputs=[prompt_input, structure_image, style_image, depth_strength, style_strength],
|
388 |
+
outputs=output_image,
|
389 |
+
fn=generate_image,
|
390 |
+
cache_examples=False, # ์บ์ ๋นํ์ฑํ
|
391 |
+
run_on_click=True # ํด๋ฆญ ์ ์๋ ์คํ
|
392 |
+
)
|
393 |
|
394 |
generate_btn.click(
|
395 |
fn=generate_image,
|
396 |
inputs=[prompt_input, structure_image, style_image, depth_strength, style_strength],
|
397 |
+
outputs=output_image
|
398 |
+
)
|
|
|
|
|
|