|
|
import gradio as gr
|
|
|
from PIL import Image
|
|
|
|
|
|
def fake_tryon(top, bottom):
|
|
|
|
|
|
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()
|
|
|
|