Upload 2 files
Browse files- app.py +26 -0
- requirements.txt +2 -0
app.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from PIL import Image
|
| 3 |
+
|
| 4 |
+
def fake_tryon(top, bottom):
|
| 5 |
+
# ์ด๊ฑด ์์ ์ฝ๋์
๋๋ค (์ค์ AI๊ฐ ์๋๊ณ ๋ ์ด๋ฏธ์ง๋ฅผ ์์๋๋ก ๋ถ์)
|
| 6 |
+
top = top.resize((512, 512))
|
| 7 |
+
bottom = bottom.resize((512, 512))
|
| 8 |
+
|
| 9 |
+
result = Image.new("RGB", (512, 1024))
|
| 10 |
+
result.paste(top, (0, 0))
|
| 11 |
+
result.paste(bottom, (0, 512))
|
| 12 |
+
|
| 13 |
+
return result
|
| 14 |
+
|
| 15 |
+
demo = gr.Interface(
|
| 16 |
+
fn=fake_tryon,
|
| 17 |
+
inputs=[
|
| 18 |
+
gr.Image(type="pil", label="Top"),
|
| 19 |
+
gr.Image(type="pil", label="Bottom")
|
| 20 |
+
],
|
| 21 |
+
outputs=gr.Image(type="pil", label="Result"),
|
| 22 |
+
title="๐งฅ AI Fashion Try-On (MVP)",
|
| 23 |
+
description="Upload top & bottom images to preview how they might look together (basic demo)."
|
| 24 |
+
)
|
| 25 |
+
|
| 26 |
+
demo.launch()
|
requirements.txt
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
gradio
|
| 2 |
+
pillow
|