Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,7 +24,8 @@ category_dict = {
|
|
| 24 |
# Function to draw bounding box and label on the image using Skia
|
| 25 |
def draw_annotation(canvas, bbox, category, source_code):
|
| 26 |
paint = skia.Paint(Color=skia.ColorRED, Style=skia.Paint.kStroke_Style, StrokeWidth=2)
|
| 27 |
-
text_paint = skia.Paint(Color=skia.ColorRED
|
|
|
|
| 28 |
|
| 29 |
# Unpack the bounding box coordinates
|
| 30 |
x_min, y_min, x_max, y_max = bbox
|
|
|
|
| 24 |
# Function to draw bounding box and label on the image using Skia
|
| 25 |
def draw_annotation(canvas, bbox, category, source_code):
|
| 26 |
paint = skia.Paint(Color=skia.ColorRED, Style=skia.Paint.kStroke_Style, StrokeWidth=2)
|
| 27 |
+
text_paint = skia.Paint(Color=skia.ColorRED)
|
| 28 |
+
text_paint.setTextSize(12)
|
| 29 |
|
| 30 |
# Unpack the bounding box coordinates
|
| 31 |
x_min, y_min, x_max, y_max = bbox
|