Spaces:
Runtime error
Runtime error
Onur Savas
commited on
Commit
•
4b32f27
1
Parent(s):
ceeb3e5
updated ocr
Browse files
main.py
CHANGED
@@ -29,12 +29,12 @@ def perform_ocr(img):
|
|
29 |
final_result = ""
|
30 |
|
31 |
image = Image.open(img).convert('RGB')
|
32 |
-
boxes = [line[0] for line in result]
|
33 |
-
txts = [line[1][0] for line in result]
|
34 |
-
scores = [line[1][1] for line in result]
|
35 |
-
im_show = draw_ocr(image, boxes, txts, scores, font_path='fonts/simfang.ttf')
|
36 |
-
im_show = Image.fromarray(im_show)
|
37 |
-
return [
|
38 |
|
39 |
demo = gr.Blocks()
|
40 |
|
|
|
29 |
final_result = ""
|
30 |
|
31 |
image = Image.open(img).convert('RGB')
|
32 |
+
# boxes = [line[0] for line in result]
|
33 |
+
# txts = [line[1][0] for line in result]
|
34 |
+
# scores = [line[1][1] for line in result]
|
35 |
+
# im_show = draw_ocr(image, boxes, txts, scores, font_path='fonts/simfang.ttf')
|
36 |
+
# im_show = Image.fromarray(im_show)
|
37 |
+
return [image, result]
|
38 |
|
39 |
demo = gr.Blocks()
|
40 |
|