CoolFace
Apppublic

Aqdas/CV-Extractor

sourceHugging Faceupdated 2y agoView on Hugging Face
2likes
image_to_text.py9 linesDownload Raw Back to root
1from PIL import Image2import pytesseract3import io4pytesseract.pytesseract.tesseract_cmd = r'/usr/bin/tesseract'5def image_to_text(images):6    img_bytes = io.BytesIO()7    images.save(img_bytes, format='PNG')  8    text = pytesseract.image_to_string(Image.open(img_bytes))9    return text