Tesseract OCR Stopped Working [May 2024]

Tesseract stopped working in Streamlit. I did some troubleshooting and found out that it does work when running the app locally, but as soon as I deploy the app, the script in bold, below, no longer works. I saw that other users raised the same issue. It stopped working from March 2024.

pytesseract.pytesseract.tesseract_cmd = ‘C:/Program Files (x86)/Tesseract-OCR/tesseract.exe’
response = requests.get(imagetoread)
img = Image.open(io.BytesIO(response.content))
text_img = pytesseract.image_to_string(img)

Can someone please advise?

You cannot use any windows paths or executables on streamlit cloud, because it is a linux debian based environment.

Thank you. What path shall I use (I’m a newbie :slight_smile: )? I used this path before, and it’s worked fine for months.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.