Spaces:
Sleeping
Sleeping
Commit
·
7ac0eca
1
Parent(s):
6f654f0
Update app.py
Browse files
app.py
CHANGED
@@ -68,9 +68,6 @@ def resize_and_overlay_image(input_image, reduction_percentage, shift_percentage
|
|
68 |
# Overlay the resized image on the background image
|
69 |
background_img[y:y + resized_height, x:x + resized_width] = resized_img
|
70 |
|
71 |
-
# Return the resulting image as a NumPy array
|
72 |
-
return background_img, f"Input Image Dimensions: {width}x{height}"
|
73 |
-
|
74 |
# Create the Gradio interface
|
75 |
iface = gr.Interface(
|
76 |
fn=resize_and_overlay_image,
|
@@ -84,8 +81,7 @@ iface = gr.Interface(
|
|
84 |
gr.inputs.Slider(minimum=0, maximum=100, step=10, default=0, label="Crop Bottom (%)")
|
85 |
],
|
86 |
outputs=[
|
87 |
-
gr.outputs.Image(type="numpy", label="Result")
|
88 |
-
gr.outputs.Textbox(label="Image Info")
|
89 |
],
|
90 |
title="Image Resizer",
|
91 |
description="Crop the input image, overlay it on a new background of the specified color, start centered, and shift it as a percentage without stretching."
|
|
|
68 |
# Overlay the resized image on the background image
|
69 |
background_img[y:y + resized_height, x:x + resized_width] = resized_img
|
70 |
|
|
|
|
|
|
|
71 |
# Create the Gradio interface
|
72 |
iface = gr.Interface(
|
73 |
fn=resize_and_overlay_image,
|
|
|
81 |
gr.inputs.Slider(minimum=0, maximum=100, step=10, default=0, label="Crop Bottom (%)")
|
82 |
],
|
83 |
outputs=[
|
84 |
+
gr.outputs.Image(type="numpy", label="Result")
|
|
|
85 |
],
|
86 |
title="Image Resizer",
|
87 |
description="Crop the input image, overlay it on a new background of the specified color, start centered, and shift it as a percentage without stretching."
|