Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,11 +16,12 @@ 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 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
25 |
print(inference(img,"ko"))
|
26 |
#balls
|
|
|
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='./simfang.ttf')
|
21 |
+
im_show = Image.fromarray(im_show)
|
22 |
+
im_show.save('result.jpg')
|
23 |
+
return txts
|
24 |
+
|
25 |
+
|
26 |
print(inference(img,"ko"))
|
27 |
#balls
|