ginipick commited on
Commit
56108b5
ยท
verified ยท
1 Parent(s): 827731a

Update app-backup.py

Browse files
Files changed (1) hide show
  1. 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.render()
388
-
 
 
 
 
 
 
 
 
 
 
 
 
 
389
 
390
  generate_btn.click(
391
  fn=generate_image,
392
  inputs=[prompt_input, structure_image, style_image, depth_strength, style_strength],
393
- outputs=[output_image]
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
+ )