This application provides an OCR (Optical Character Recognition) service, allowing users to upload their receipts, and get back the products and prices that were spent on that specific date.
To install and get the app to function you can follow these steps:
Clone the repository and switch to the branch called Cynthia/DBM
with the checkout
command.
Make sure you have Postman installed as well as Docker and Docker compose.
The requirements.txt
will work, when building the docker-compose, as a caller to make the installation of all the used libraries and dependencies.
This includes:
There are also some dependencies for the OCR:
Navigate to the application directory.
Run docker compose up --build
, you will see the Docker container building and it would look like this:
Then you will have an output giving you two addresses, but you will choose the first one:
Copy that address and copy it in the Postman application. You have to click on new, the HTTP, and paste the address.
After that, you will have to change from GET to POST and add after the address /img2text
.
Then you should go to the space body
in Postman and click on raw
so you can input the image in the base64 format and make the JSON.
To test the output, for now, you have to input an image in base64 format.
Construct a JSON object with the key img
and the base64 string as the value.
Example for any image:
{"img": "base64EncodedImageString"}
The output should look like this after pasting the string.
This is an example of a base64 string image, just for testing the service: b64.txt