Spaces:
Runtime error
Runtime error
update font
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ def inference(img, lang):
|
|
| 16 |
boxes = [line[0] for line in result]
|
| 17 |
txts = [line[1][0] for line in result]
|
| 18 |
scores = [line[1][1] for line in result]
|
| 19 |
-
im_show = draw_ocr(image, boxes, txts, scores
|
| 20 |
im_show = Image.fromarray(im_show)
|
| 21 |
im_show.save('result.jpg')
|
| 22 |
return 'result.jpg'
|
|
|
|
| 16 |
boxes = [line[0] for line in result]
|
| 17 |
txts = [line[1][0] for line in result]
|
| 18 |
scores = [line[1][1] for line in result]
|
| 19 |
+
im_show = draw_ocr(image, boxes, txts, scores, font_path='RightSans.ttf')
|
| 20 |
im_show = Image.fromarray(im_show)
|
| 21 |
im_show.save('result.jpg')
|
| 22 |
return 'result.jpg'
|