File size: 163 Bytes
bbc0d7c
b151755
bbc0d7c
b151755
 
 
1
2
3
4
5
6
7
from PIL import Image
import pytesseract

def extract_screen_text(image_file) -> str:
    img = Image.open(image_file)
    return pytesseract.image_to_string(img)