File size: 273 Bytes
63b5898
180356f
63b5898
180356f
63b5898
 
 
 
180356f
63b5898
 
180356f
63b5898
180356f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from paddleocr import PaddleOCR
import numpy as np

ocr = PaddleOCR(use_angle_cls=True, lang="en")

def extract_text(image):
    result = ocr.ocr(image)

    text = ""
    for line in result:
        for word in line:
            text += word[1][0] + "\n"

    return text