Spaces:
Runtime error
Runtime error
Edvin Behdadijd
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -37,7 +37,7 @@ def detect_objects(image):
|
|
| 37 |
|
| 38 |
# Put the class name above the bounding box
|
| 39 |
class_name = model.model.names[int(class_id)]
|
| 40 |
-
cv2.putText(image, f'{class_name} {score:.2f}', (x1, y1 - 10), cv2.FONT_HERSHEY_SIMPLEX,
|
| 41 |
|
| 42 |
# Convert back to PIL image
|
| 43 |
return Image.fromarray(image)
|
|
|
|
| 37 |
|
| 38 |
# Put the class name above the bounding box
|
| 39 |
class_name = model.model.names[int(class_id)]
|
| 40 |
+
cv2.putText(image, f'{class_name} {score:.2f}', (x1, y1 - 10), cv2.FONT_HERSHEY_SIMPLEX, 4, color, 1)
|
| 41 |
|
| 42 |
# Convert back to PIL image
|
| 43 |
return Image.fromarray(image)
|