File size: 757 Bytes
81cde6e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import gradio as gr
from PIL import Image

def fake_tryon(top, bottom):
    # ์ด๊ฑด ์ž„์‹œ ์ฝ”๋“œ์ž…๋‹ˆ๋‹ค (์‹ค์ œ AI๊ฐ€ ์•„๋‹ˆ๊ณ  ๋‘ ์ด๋ฏธ์ง€๋ฅผ ์œ„์•„๋ž˜๋กœ ๋ถ™์ž„)
    top = top.resize((512, 512))
    bottom = bottom.resize((512, 512))

    result = Image.new("RGB", (512, 1024))
    result.paste(top, (0, 0))
    result.paste(bottom, (0, 512))
    
    return result

demo = gr.Interface(
    fn=fake_tryon,
    inputs=[
        gr.Image(type="pil", label="Top"),
        gr.Image(type="pil", label="Bottom")
    ],
    outputs=gr.Image(type="pil", label="Result"),
    title="๐Ÿงฅ AI Fashion Try-On (MVP)",
    description="Upload top & bottom images to preview how they might look together (basic demo)."
)

demo.launch()