Reads text from a receipt img url post request | Code by Jacob Fisher, Jatinder Singh & Me
255
Listens on port 3000
Waits for a post that contains a string-ified JSON file with a value "url" set to the image url for the Tesseract OCR to analyze. data is formatted in a JSON that matches item names to prices, total price, and shop name. This can evaluate the receipt info of the following stores: Walmart, Safeway, Fred Meyer, and Grocery Outlet.
Requires Docker Desktop: https://www.docker.com/products/docker-desktop/
To download from docker: docker pull ibrahimsydock/tesseract-receipt-reader:latest
To run: docker container run -p 3000:3000 ibrahimsydock/tesseract-receipt-reader
The 3000:3000 specifies it will be running on the computer's localhost at port 3000
Find the code to the image here: https://github.com/Reciept-reader/reciept-reader/tree/main in the /docker-container/ folder
To build the image from the folder:
Change directory to the docker-container folder
Enter: docker image build -t ibrahimsydock/tesseract-receipt-reader .
DON'T FORGET THE DOT AT THE END OF THE COMMAND
In the Dockerfile, line 17, the port can be modified. In index.js, line 17, the port can also be modified.
The API post to where the docker container is running can be changed in the MobileApp/src/function/connectToOCRFun.js, either by passing a different link as the "hostUrl" parameter, or by editing the constant linkToContainer variable on line 4. For example, if both the app and container is running on your current computer, the link can be changed to "http://localhost:3000"
Content type
Image
Digest
sha256:a304d2bd0…
Size
421.8 MB
Last updated
over 3 years ago
docker pull ibrahimsydock/tesseract-receipt-reader