Update app.py
Browse files
app.py
CHANGED
@@ -78,19 +78,19 @@ def process_images(image_a, image_b, design_bbox):
|
|
78 |
result = fit_and_warp_design(image_a, image_b, design_bbox)
|
79 |
return result
|
80 |
|
81 |
-
# Gradio UI components
|
82 |
image_input_a = gr.Image(label="Upload Clothing Image", type="pil")
|
83 |
image_input_b = gr.Image(label="Upload Design Image", type="pil")
|
84 |
-
design_bbox_input = gr.Image(
|
85 |
|
86 |
# Define the Gradio interface
|
87 |
iface = gr.Interface(
|
88 |
fn=process_images,
|
89 |
-
inputs=[image_input_a, design_bbox_input],
|
90 |
outputs="image",
|
91 |
title="Clothing Design Fitting with Drag-and-Drop",
|
92 |
description="Upload a clothing image and a design image. Drag and resize the design onto the clothing using the cursor.",
|
93 |
)
|
94 |
|
95 |
# Launch the interface
|
96 |
-
iface.launch()
|
|
|
78 |
result = fit_and_warp_design(image_a, image_b, design_bbox)
|
79 |
return result
|
80 |
|
81 |
+
# Gradio UI components
|
82 |
image_input_a = gr.Image(label="Upload Clothing Image", type="pil")
|
83 |
image_input_b = gr.Image(label="Upload Design Image", type="pil")
|
84 |
+
design_bbox_input = gr.Image(label="Adjust Design Position and Size", type="pil")
|
85 |
|
86 |
# Define the Gradio interface
|
87 |
iface = gr.Interface(
|
88 |
fn=process_images,
|
89 |
+
inputs=[image_input_a, image_input_b, design_bbox_input],
|
90 |
outputs="image",
|
91 |
title="Clothing Design Fitting with Drag-and-Drop",
|
92 |
description="Upload a clothing image and a design image. Drag and resize the design onto the clothing using the cursor.",
|
93 |
)
|
94 |
|
95 |
# Launch the interface
|
96 |
+
iface.launch()
|