Spaces:
Runtime error
Runtime error
update
Browse files
app.py
CHANGED
|
@@ -18,7 +18,7 @@ def detect_and_visualize_objects(image):
|
|
| 18 |
# Draw bounding boxes and labels on the image
|
| 19 |
draw = ImageDraw.Draw(image)
|
| 20 |
if len(predictions) == 0:
|
| 21 |
-
draw.text((
|
| 22 |
else:
|
| 23 |
for prediction in predictions:
|
| 24 |
box = prediction["box"]
|
|
|
|
| 18 |
# Draw bounding boxes and labels on the image
|
| 19 |
draw = ImageDraw.Draw(image)
|
| 20 |
if len(predictions) == 0:
|
| 21 |
+
draw.text((100, 100), "Object not found in image", fill="red")
|
| 22 |
else:
|
| 23 |
for prediction in predictions:
|
| 24 |
box = prediction["box"]
|