Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -392,7 +392,7 @@ def add_rectangular_boundary(doc, polygons_inch, boundary_length, boundary_width
|
|
392 |
|
393 |
# Check if boundary exceeds image limits (1 inch less than image dimensions)
|
394 |
if image_height_in is not None and image_width_in is not None:
|
395 |
-
if boundary_length_in > (image_height_in -
|
396 |
raise BoundaryExceedsError("Error: The specified boundary dimensions exceed the allowed image dimensions. Please enter smaller values.")
|
397 |
|
398 |
# Calculate center of inner contours
|
|
|
392 |
|
393 |
# Check if boundary exceeds image limits (1 inch less than image dimensions)
|
394 |
if image_height_in is not None and image_width_in is not None:
|
395 |
+
if boundary_length_in > (image_height_in - 2) or boundary_width_in > (image_width_in - 2):
|
396 |
raise BoundaryExceedsError("Error: The specified boundary dimensions exceed the allowed image dimensions. Please enter smaller values.")
|
397 |
|
398 |
# Calculate center of inner contours
|