Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -127,23 +127,7 @@ def process_image(image):
|
|
| 127 |
]
|
| 128 |
|
| 129 |
draw_boxes(image, true_boxes, true_predictions)
|
| 130 |
-
|
| 131 |
-
'''' # draw predictions over the image
|
| 132 |
-
draw = ImageDraw.Draw(image)
|
| 133 |
-
font = ImageFont.load_default()
|
| 134 |
-
for prediction, box in zip(true_predictions, true_boxes):
|
| 135 |
-
predicted_label = iob_to_label(prediction).lower()
|
| 136 |
-
draw.rectangle(box, outline=label2color[predicted_label])
|
| 137 |
-
draw.text(
|
| 138 |
-
(box[0] + 10, box[1] - 10),
|
| 139 |
-
text=predicted_label,
|
| 140 |
-
fill=label2color[predicted_label],
|
| 141 |
-
font=font,
|
| 142 |
-
)
|
| 143 |
-
''''
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
return image
|
| 148 |
|
| 149 |
|
|
|
|
| 127 |
]
|
| 128 |
|
| 129 |
draw_boxes(image, true_boxes, true_predictions)
|
| 130 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
return image
|
| 132 |
|
| 133 |
|