Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,7 +23,7 @@ def detect_objects(images):
|
|
| 23 |
# Load the image using OpenCV
|
| 24 |
# img = cv2.imread(image_path)
|
| 25 |
# Process each detected object
|
| 26 |
-
if
|
| 27 |
for result in results_detection:
|
| 28 |
for box in result.boxes:
|
| 29 |
# Get bounding box coordinates (x1, y1, x2, y2)
|
|
|
|
| 23 |
# Load the image using OpenCV
|
| 24 |
# img = cv2.imread(image_path)
|
| 25 |
# Process each detected object
|
| 26 |
+
if results_detection:
|
| 27 |
for result in results_detection:
|
| 28 |
for box in result.boxes:
|
| 29 |
# Get bounding box coordinates (x1, y1, x2, y2)
|