Spaces:
Sleeping
Sleeping
| 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 |