feylur commited on
Commit
30a97ba
·
verified ·
1 Parent(s): 94ff4c1
Files changed (1) hide show
  1. app.py +17 -0
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from inference_module.run_inference import predict
3
+ from PIL import Image
4
+
5
+ def infer(person, cloth):
6
+ out_path = predict(person, cloth)
7
+ return Image.open(out_path)
8
+
9
+ demo = gr.Interface(
10
+ fn=infer,
11
+ inputs=[gr.Image(type="pil"), gr.Image(type="pil")],
12
+ outputs=gr.Image(type="pil"),
13
+ description="CatVTON demo — upload person + cloth"
14
+ )
15
+
16
+ if __name__ == "__main__":
17
+ demo.launch(server_name="0.0.0.0", server_port=7860)