Final / inference.py
tayy786's picture
Create inference.py
3e893ce verified
Raw
History Blame Contribute Delete
481 Bytes
from PIL import Image, ImageOps
def generate_tryon(person_path, cloth_path):
"""
Dummy function for Hugging Face Space.
Replace with actual OpenTryOn/OpenVTO inference code.
"""
person = Image.open(person_path).convert("RGB")
cloth = Image.open(cloth_path).convert("RGB")
# Simple placeholder: overlay cloth thumbnail on person image
cloth_resized = ImageOps.fit(cloth, (150, 150))
person.paste(cloth_resized, (50, 50))
return person