Extract structured data from invoices and receipts using a local LLM β no cloud, no API keys, 100% private.
ββββββββββββββββββββββββββββββββββββββββββββββββ
β Invoice Input (text / file) β
β β β
β ββββββββΌββββββββ β
β β Invoice β β
β β Parser β β
β ββββββββ¬ββββββββ β
β β β
β ββββββββΌββββββββ β
β β Ollama β β
β β (Gemma 4) β β
β ββββββββ¬ββββββββ β
β βββββββββββββββΌββββββββββββββ β
β βββββ½βββββ βββββββ½βββββ ββββββ½ββββββ β
β βVendor β β Line β βCategory β β
β βDetails β β Items β βClassifierβ β
β ββββββββββ ββββββββββββ ββββββββββββ β
β β β
β βββββββββββββββΌββββββββββββββ β
β βββββ½βββββ βββββββ½βββββ ββββββ½ββββββ β
β β JSON β β CSV β β Batch β β
β β Export β β Export β β Report β β
β ββββββββββ ββββββββββββ ββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββ
- Structured Data Extraction β Parses vendor details, line items, totals, tax, and payment terms from raw invoice text
- Automatic Categorization β Classifies line items into categories like Software, Hardware, Travel, and Consulting
- Batch Processing β Process multiple invoices in one run with configurable batch sizes
- Duplicate Detection β Identifies near-duplicate invoices using configurable similarity thresholds
- Multi-Format Export β Output extracted data as JSON or CSV for downstream accounting systems
- Rich CLI Interface β Beautiful terminal output with color-coded tables and progress indicators
- Streamlit Web UI β Browser-based dashboard for uploading invoices and reviewing extracted data
- FastAPI REST Endpoint β Programmatic API access for integrating into automated AP workflows
- Docker Ready β Full Docker and Docker Compose support for containerized deployment
- 100% Local & Private β All inference runs through Ollama locally; sensitive financial data never leaves your machine
- Python 3.11 or higher
- Ollama installed and running
- Gemma 4 model pulled:
ollama pull gemma4
git clone https://github.com/kennedyraju55/invoice-extractor.git
cd invoice-extractor
pip install -r requirements.txtCLI:
python -m src.invoice_extractor.cli extract --file invoice.txtWeb UI:
streamlit run src/invoice_extractor/web_ui.pyDocker:
docker-compose up| Technology | Purpose |
|---|---|
| Gemma 4 + Ollama | Local LLM inference for invoice parsing and categorization |
| Click + Rich | CLI framework with formatted tables and progress bars |
| Streamlit | Interactive web dashboard for invoice uploads |
src/invoice_extractor/β Core application: parsing engine, categorizer, CLI, web UI, APIcommon/β Shared LLM client utilities for Ollama integrationtests/β Unit and integration test suitedocs/β Documentation and architecture diagramsexamples/β Sample invoices and expected extraction outputs
Nrk Raju Guthikonda β GitHub: kennedyraju55 Β· Dev.to Β· LinkedIn