Spaces:
Running
Running
File size: 317 Bytes
6604d8f |
1 2 3 4 5 6 7 8 9 10 |
from PIL import Image
import pytesseract
# If you don't have tesseract executable in your PATH, include the following:
pytesseract.pytesseract.tesseract_cmd = r'C:\TesseractOCR\tesseract'
# Simple image to string
def img2string(imgPath):
textOfImage = pytesseract.image_to_string(imgPath)
return textOfImage |