This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle
What I Built
LocalAI Invoice Copilot turns text-based PDF invoices into structured records that freelancers and small businesses can review and export as CSV. It extracts details such as vendor, invoice number, date, tax, and total, then flags missing fields, possible duplicates, and totals that do not add up.
The people most likely to pay for it are freelancers and small teams who are tired of manually copying invoice details into spreadsheets, but don’t want to send financial documents to a hosted AI service.
It’s a prototype: records are kept in memory, and extracted values should be reviewed before use.
Demo
There’s no hosted demo yet. The app runs locally, which is also how the invoice text stays on your machine.
- Install Ollama and download the model with ollama pull qwen2.5:3b.
- Install the Python dependencies with pip install -r requirements.txt.
- Start the app with python -m streamlit run app.py.
- Load the synthetic demo invoice or upload a text-based PDF, review the extracted fields, and download the CSV.
- Scanned PDFs are not supported in the app yet; they need OCR.
Code
Source code: [https://github.com/priyeshdabre07/localai-invoice-copilot]
The app uses pypdf to read PDF text, asks the local model for structured JSON, and provides an editable review table with basic validation before CSV export.
How I Built It
The app is built with Python and Streamlit. It sends invoice text to Qwen2.5 3B through Ollama’s local API, using a JSON schema and a prompt that tells the model to leave uncertain fields blank rather than invent values. pypdf extracts selectable text from PDFs, and pandas handles the review table and CSV export.
Why Does Open Innovation Matter?
Invoices contain financial and business information that freelancers may not want to send to a third-party AI service. With local inference, invoice text stays on the user’s machine instead of going to a hosted LLM API. After downloading the model, there’s no per-invoice API fee; the tradeoff is that inference uses the user’s own hardware.
Using an open-weight model also makes the extraction prompt and expected fields easy to inspect and adapt to different workflows.
Prize Categories
Entering the overall Side Hustle challenge. No partner category.
#devchallenge #hf26challenge
Top comments (0)