| 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 | |