Spaces:
Runtime error
Runtime error
update
Browse files
app.py
CHANGED
@@ -16,11 +16,11 @@ 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 |
-
font_path='RightSans.ttf')
|
21 |
im_show = Image.fromarray(im_show)
|
22 |
im_show.save('result.jpg')
|
23 |
return 'result.jpg'
|
|
|
24 |
|
25 |
title = 'PaddleOCR'
|
26 |
description = 'Gradio demo for PaddleOCR. PaddleOCR demo supports Chinese, English, French, German, Korean and Japanese.To use it, simply upload your image and choose a language from the dropdown menu, or click one of the examples to load them. Read more at the links below.'
|
|
|
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'
|
23 |
+
|
24 |
|
25 |
title = 'PaddleOCR'
|
26 |
description = 'Gradio demo for PaddleOCR. PaddleOCR demo supports Chinese, English, French, German, Korean and Japanese.To use it, simply upload your image and choose a language from the dropdown menu, or click one of the examples to load them. Read more at the links below.'
|