To run this ocr, you'll need to install the pytesseract module. You will need to replace the Tesseract dir with your own one including the .exe file. It can be found on your local hard drive C, inside the program files folder.
Also, Tesseract would be required. The link is available here
Place your images inside a folder with the ocr.py file and run it inside the terminal as a regular Python file.
This script was made with ChatGPT with some finishing touches.