pytesseract and tesseract

Hi, I would like to run an python API to use OCR function from pytesseract, but it needs to install the tesseract from google. Any idea how to do it in Railway?
9 Replies
Percy
Percy11mo ago
Project ID: N/A
Elber Domingos
Elber Domingos11mo ago
N/A
Brody
Brody11mo ago
but it needs to install the tesseract from google
please provide more information
Elber Domingos
Elber Domingos11mo ago
I need to install a binary in windows or run $brew install tesseract on MAC to be able to use the library pytesseract.
Elber Domingos
Elber Domingos11mo ago
I don't know if it is possible to install it someway in railway, or if I need to have it in a docker, and run everything from there
Brody
Brody11mo ago
it looks like it's available as a nix package add this nixpacks.toml file to your project
[phases.setup]
nixPkgs = ["...", "tesseract"]
[phases.setup]
nixPkgs = ["...", "tesseract"]
Elber Domingos
Elber Domingos11mo ago
That is great. I will test. Thank you
danainan0
danainan010mo ago
@elberrd In the function image_to_string how to make it work