AIMLInterviewer / ocr.py
gk2410's picture
Update ocr.py
b151755 verified
raw
history blame contribute delete
163 Bytes
from PIL import Image
import pytesseract
def extract_screen_text(image_file) -> str:
img = Image.open(image_file)
return pytesseract.image_to_string(img)