Hi,
I can refactor the code to be used inside a GET request handler.
It will take the same amount of time when the server will start, but afterwards it should take less and less.
The path can be something like https:<server>/image/decode-text/?image_url=<image_url>.
This is the case when you have an image url.
If you have the image locally , you need to do a POST request and you need an HTML form where you need to upload the image.
It depends what is your need.
Anyway, let me know if I can help,
I have 7 years of Python,
I think I can have this code done in less than 2 days.
Have a nice day,
Bogdan