| import gradio as gr | |
| from inference import generate_tryon | |
| def tryon_interface(person, cloth): | |
| return generate_tryon(person, cloth) | |
| iface = gr.Interface( | |
| fn=tryon_interface, | |
| inputs=[ | |
| gr.Image(type="filepath", label="Person Image"), | |
| gr.Image(type="filepath", label="Cloth Image") | |
| ], | |
| outputs=gr.Image(label="Try-On Result"), | |
| title="Virtual Try-On App", | |
| description="Upload a person image and a clothing image to see the try-on result." | |
| ) | |
| if __name__ == "__main__": | |
| iface.launch() | |