Spaces:
ginipick
/
Running on Zero

ginipick commited on
Commit
be37028
โ€ข
1 Parent(s): 56108b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +49 -44
app.py CHANGED
@@ -337,54 +337,59 @@ examples = [
337
 
338
  output_image = gr.Image(label="Virtual Try-On Result")
339
 
340
- with gr.Blocks(theme="Yntec/HaleyCH_Theme_Orange") as app:
341
- gr.Markdown("# Style Generator")
342
- gr.Markdown("Upload your photo and try on different clothing items virtually using AI. The system will generate an image of you wearing the selected clothing while maintaining your pose and appearance.")
 
 
 
343
 
344
- with gr.Row():
345
- with gr.Column():
346
- prompt_input = gr.Textbox(
347
- label="Style Description",
348
- placeholder="Describe the desired style (e.g., 'person wearing elegant dress')"
349
- )
350
  with gr.Row():
351
- with gr.Group():
352
- structure_image = gr.Image(
353
- label="Your Photo (Full-body)",
354
- type="filepath"
355
- )
356
- gr.Markdown("*Upload a clear, well-lit full-body photo*")
357
- depth_strength = gr.Slider(
358
- minimum=0,
359
- maximum=50,
360
- value=15,
361
- label="Fitting Strength"
362
  )
363
- with gr.Group():
364
- style_image = gr.Image(
365
- label="Clothing Item",
366
- type="filepath"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
367
  )
368
- gr.Markdown("*Upload the clothing item you want to try on*")
369
- style_strength = gr.Slider(
370
- minimum=0,
371
- maximum=1,
372
- value=0.5,
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(
 
337
 
338
  output_image = gr.Image(label="Virtual Try-On Result")
339
 
340
+ # Gradio ์ธํ„ฐํŽ˜์ด์Šค ์ƒ์„ฑ
341
+ demo = gr.Blocks(theme="Yntec/HaleyCH_Theme_Orange")
342
+
343
+ with demo:
344
+ gr.Markdown("# ๐ŸŽญ StyleGen : Fashion AI Studio")
345
+ gr.Markdown("Generate fashion images and try on virtual clothing using AI")
346
 
347
+ with gr.Tabs():
348
+ # Virtual Try-On ํƒญ
349
+ with gr.TabItem("๐Ÿ‘” Virtual Try-On"):
 
 
 
350
  with gr.Row():
351
+ with gr.Column():
352
+ prompt_input = gr.Textbox(
353
+ label="Style Description",
354
+ placeholder="Describe the desired style (e.g., 'person wearing elegant dress')"
 
 
 
 
 
 
 
355
  )
356
+ with gr.Row():
357
+ with gr.Group():
358
+ structure_image = gr.Image(
359
+ label="Your Photo (Full-body)",
360
+ type="filepath"
361
+ )
362
+ gr.Markdown("*Upload a clear, well-lit full-body photo*")
363
+ depth_strength = gr.Slider(
364
+ minimum=0,
365
+ maximum=50,
366
+ value=15,
367
+ label="Fitting Strength"
368
+ )
369
+ with gr.Group():
370
+ style_image = gr.Image(
371
+ label="Clothing Item",
372
+ type="filepath"
373
+ )
374
+ gr.Markdown("*Upload the clothing item you want to try on*")
375
+ style_strength = gr.Slider(
376
+ minimum=0,
377
+ maximum=1,
378
+ value=0.5,
379
+ label="Style Transfer Strength"
380
+ )
381
+ tryon_btn = gr.Button("Generate Try-On")
382
+
383
+ gr.Examples(
384
+ examples=examples,
385
+ inputs=[prompt_input, structure_image, style_image, depth_strength, style_strength],
386
+ outputs=output_image,
387
+ fn=generate_image,
388
+ cache_examples=False
389
  )
390
+
391
+ with gr.Column():
392
+ output_image = gr.Image(label="Virtual Try-On Result")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
393
 
394
 
395
  generate_btn.click(