ArmanRV commited on
Commit
6a69f5d
·
verified ·
1 Parent(s): bbb46c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -0
app.py CHANGED
@@ -387,6 +387,23 @@ div[class*="footer"] {display:none !important;}
387
  button[aria-label="Settings"] {display:none !important;}
388
  """
389
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
390
 
391
  def refresh_catalog(gender: str):
392
  ensure_garments_available()
@@ -567,6 +584,16 @@ with gr.Blocks(title="Virtual Try-On Rendez-vous", css=CUSTOM_CSS) as demo:
567
  "✔ В кадре только вы"
568
  )
569
 
 
 
 
 
 
 
 
 
 
 
570
  gender = gr.Radio(
571
  choices=["Женская", "Мужская"],
572
  value=_default_gender,
 
387
  button[aria-label="Settings"] {display:none !important;}
388
  """
389
 
390
+ # =========================
391
+ # UX example image (stored in repo)
392
+ # =========================
393
+ UX_EXAMPLE_IMG_PATH = "assets/photo_2026-02-26_14-56-24.jpg"
394
+
395
+
396
+ def _load_ux_example_pil() -> Optional[Image.Image]:
397
+ try:
398
+ if UX_EXAMPLE_IMG_PATH and os.path.exists(UX_EXAMPLE_IMG_PATH):
399
+ return Image.open(UX_EXAMPLE_IMG_PATH).convert("RGB")
400
+ except Exception as e:
401
+ print("UX example image load failed:", repr(e), flush=True)
402
+ return None
403
+
404
+
405
+ _UX_EXAMPLE_PIL = _load_ux_example_pil()
406
+
407
 
408
  def refresh_catalog(gender: str):
409
  ensure_garments_available()
 
584
  "✔ В кадре только вы"
585
  )
586
 
587
+ # UX image under the tips
588
+ gr.Image(
589
+ value=_UX_EXAMPLE_PIL,
590
+ label="",
591
+ show_label=False,
592
+ interactive=False,
593
+ height=260,
594
+ visible=bool(_UX_EXAMPLE_PIL),
595
+ )
596
+
597
  gender = gr.Radio(
598
  choices=["Женская", "Мужская"],
599
  value=_default_gender,