Spaces:
Runtime error
Runtime error
clear bbox drawing
Browse files
app.py
CHANGED
|
@@ -19,7 +19,7 @@ def inference(img, lang):
|
|
| 19 |
scores = [line[1][1] for line in result]
|
| 20 |
|
| 21 |
image = Image.open(img_path).convert('RGB')
|
| 22 |
-
im_show = draw_ocr(image, boxes, txts, scores,
|
| 23 |
font_path='simfang.ttf')
|
| 24 |
im_show = Image.fromarray(im_show)
|
| 25 |
im_show.save('result.jpg')
|
|
|
|
| 19 |
scores = [line[1][1] for line in result]
|
| 20 |
|
| 21 |
image = Image.open(img_path).convert('RGB')
|
| 22 |
+
im_show = draw_ocr(image, boxes, txts=None, scores=None, # https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.7/tools/infer/utility.py#L365
|
| 23 |
font_path='simfang.ttf')
|
| 24 |
im_show = Image.fromarray(im_show)
|
| 25 |
im_show.save('result.jpg')
|