Update app.py
Browse files
app.py
CHANGED
@@ -69,8 +69,7 @@ def get_annotated_image(in_pil_img):
|
|
69 |
# 计算字体大小
|
70 |
box_width = box['xmax'] - box['xmin']
|
71 |
font_size = get_font_size(box_width)
|
72 |
-
font = ImageFont.
|
73 |
-
font = ImageFont.truetype(font=font, size=font_size) # 确保你有可用的字体文件
|
74 |
|
75 |
# 获取文本边界框
|
76 |
text = f"{label}: {score}%"
|
|
|
69 |
# 计算字体大小
|
70 |
box_width = box['xmax'] - box['xmin']
|
71 |
font_size = get_font_size(box_width)
|
72 |
+
font = ImageFont.truetype(font=“arial.ttf”, size=font_size) # 确保你有可用的字体文件
|
|
|
73 |
|
74 |
# 获取文本边界框
|
75 |
text = f"{label}: {score}%"
|