Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -48,7 +48,6 @@ def process_image(image, color, design, design_position, text, text_position, fo
|
|
48 |
if crop_coords:
|
49 |
image = crop_image(image, crop_coords)
|
50 |
return image
|
51 |
-
|
52 |
def get_crop_coords(crop_points):
|
53 |
if crop_points:
|
54 |
x_coords = [point[0] for point in crop_points]
|
@@ -66,13 +65,13 @@ interface = gr.Interface(
|
|
66 |
inputs=[
|
67 |
gr.Image(type="pil"),
|
68 |
gr.ColorPicker(label="Color"),
|
69 |
-
gr.
|
70 |
gr.Point(label="Design Position"),
|
71 |
gr.Textbox(label="Text"),
|
72 |
gr.Point(label="Text Position"),
|
73 |
gr.Slider(10, 100, step=1, default=20, label="Font Size"),
|
74 |
gr.ColorPicker(label="Font Color"),
|
75 |
-
gr.
|
76 |
gr.Slider(0, 360, step=1, default=None, label="Rotate"),
|
77 |
gr.Points(label="Crop Area")
|
78 |
],
|
@@ -80,4 +79,4 @@ interface = gr.Interface(
|
|
80 |
live=True
|
81 |
)
|
82 |
|
83 |
-
interface.launch()
|
|
|
48 |
if crop_coords:
|
49 |
image = crop_image(image, crop_coords)
|
50 |
return image
|
|
|
51 |
def get_crop_coords(crop_points):
|
52 |
if crop_points:
|
53 |
x_coords = [point[0] for point in crop_points]
|
|
|
65 |
inputs=[
|
66 |
gr.Image(type="pil"),
|
67 |
gr.ColorPicker(label="Color"),
|
68 |
+
gr.File(label="Design"),
|
69 |
gr.Point(label="Design Position"),
|
70 |
gr.Textbox(label="Text"),
|
71 |
gr.Point(label="Text Position"),
|
72 |
gr.Slider(10, 100, step=1, default=20, label="Font Size"),
|
73 |
gr.ColorPicker(label="Font Color"),
|
74 |
+
gr.Slider(50, 1000, step=1, default=None, label="Resize"),
|
75 |
gr.Slider(0, 360, step=1, default=None, label="Rotate"),
|
76 |
gr.Points(label="Crop Area")
|
77 |
],
|
|
|
79 |
live=True
|
80 |
)
|
81 |
|
82 |
+
interface.launch()
|