File size: 183 Bytes
0f0d66e
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
from PIL import Image
import pytesseract


def extract_text(image_path: str):

    img = Image.open(image_path)

    text = pytesseract.image_to_string(img)

    return text