Upload a bank statement PDF (a downloaded one or a scan) and get your total spending, a category breakdown, your biggest spends and a short written summary.
Model: gemma-4-26b-a4b-it (Gemma 4 through the Gemini API, using the google-genai package)
- You pick a PDF and click Analyze statement.
- The server reads the text from the PDF. If there is almost no text (a scan), it turns the pages into one image instead.
- One Gemma call (
askorask_with_imagefromgemma_client.py) returns the transactions as JSON. - Plain Python adds up the totals and categories. No database, no login.
- Install Python 3.10 or newer.
- Install the packages:
pip install -r requirements.txt - Copy
.env.exampleto.envand put your key in it:GEMINI_API_KEY=your-key-here.envis in.gitignore, so it is never committed. - Start the app:
python app.py - Open http://localhost:5000, choose a PDF and click Analyze statement.
gemma_client.py– the Gemma helper (unchanged)app.py– the Flask serverstatic/index.html– the single pageLICENSE– license for this project