Upload a bank statement as a PDF (downloaded or scanned), a PNG/JPG photo or screenshot, or a CSV, 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, PNG, JPG or CSV file and click Analyze spending.
- The server reads the text from a PDF or CSV. A scanned PDF is turned into one image, and PNG/JPG photos are shrunk and sent as an image.
- 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 file with Import statement and click Analyze spending.
gemma_client.py– the Gemma helper (unchanged)app.py– the Flask serverstatic/index.html– the single pageLICENSE– license for this project