ammariii08 commited on
Commit
62238e9
·
verified ·
1 Parent(s): 29b0939

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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 - 1) or boundary_width_in > (image_width_in - 1):
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