The project is a simple expense tracker that allows you to track your expenses by taking a picture of your receipt.
- Clone the repository
git clone https://github.com/aniketmaurya/expensify.git
cd expensify
- Install maestro
git clone https://github.com/roboflow/maestro.git
cd maestro
pip install roboflow .
- Update the dataset in the
data
folder - Run the
train.ipynb
file
The following command deploys the model as a server on port 8000.
python server.py
Send a receipt image to the server and get the total amount spent.
import base64
import requests
url = "http://127.0.0.1:8000/predict"
image_path = "test.jpg"
with open(image_path, "rb") as image_file:
encoded_string = base64.b64encode(image_file.read()).decode("utf-8")
response = requests.post(url, json={"text": "<VQA>Given the following receipt, extract the total amount spent.", "image_data": encoded_string})
print(response.json())
Output:
{
"total": 26.15
}