Update app.py
Browse files
app.py
CHANGED
|
@@ -49,7 +49,7 @@ def predict(image: Image.Image):
|
|
| 49 |
draw.rectangle([x1, y1, x2, y2], outline="blue", width=3)
|
| 50 |
|
| 51 |
# Calculate the position of the text (above the bounding box)
|
| 52 |
-
text = f"Caries
|
| 53 |
text_bbox = draw.textbbox((x1, y1 - 30), text, font=font, align ="Center") # Text position and size
|
| 54 |
text_width = text_bbox[2] - text_bbox[0]
|
| 55 |
text_height = text_bbox[3] - text_bbox[1]
|
|
|
|
| 49 |
draw.rectangle([x1, y1, x2, y2], outline="blue", width=3)
|
| 50 |
|
| 51 |
# Calculate the position of the text (above the bounding box)
|
| 52 |
+
text = f"Caries ({confidence[0]:.2f})"
|
| 53 |
text_bbox = draw.textbbox((x1, y1 - 30), text, font=font, align ="Center") # Text position and size
|
| 54 |
text_width = text_bbox[2] - text_bbox[0]
|
| 55 |
text_height = text_bbox[3] - text_bbox[1]
|