Syrex
Syrex

Reputation: 1

Problem with python script that takes image to text

When running this script and trying to paste it, it doesn't work.

import pytesseract
import pyperclip
import PIL.Image

# Open the image file
image = PIL.Image.open('generate_word_picture.png')

# Extract the text from the image using pytesseract
text = pytesseract.image_to_string(image)

# Copy the text to the clipboard
pyperclip.copy(text)

This is the image: Image

I have these installed:

-pip install pytesseract

-pip install pyperclip

-https://github.com/UB-Mannheim/tesseract/wiki

Upvotes: 0

Views: 58

Answers (0)

Related Questions