FinExtract AI
Tiny tool to read money from invoices. Fast. Friendly.
Quick demo
- You drop a PDF invoice.
- The app finds invoice number, date, vendor, subtotal, tax, and total.
- You click one big green button. It gives you a CSV.
Start in 3 minutes
Copy these 4 lines. Done.
bashpython -m venv .venv # Windows .\.venv\Scripts\pip install -U pip .\.venv\Scripts\pip install -r requirements.txt .\.venv\Scripts\python -m streamlit run app.py
Mac/Linux users:
bashpython -m venv .venv source .venv/bin/activate pip install -U pip pip install -r requirements.txt && streamlit run app.py
Super simple setup (for beginners)
- Install Python 3.10 or newer.
- Open your terminal.
- Paste the 4 commands above.
- Put your PDFs ready.
- Open the app link in your browser. Smile 🙂
How to use
- Upload your invoice PDF.
- Click the big button: "Extract & Download CSV".
- Save the CSV to your computer.
UI / UX specs
-
Put your mockup here:

UI Mockup
-
Streamlit Theme (copy to .streamlit/config.toml)
toml[theme] base = "light" primaryColor = "#10B981" # green backgroundColor = "#FFFFFF" secondaryBackgroundColor = "#F7F7F8" textColor = "#111827" font = "sans serif"
- Google Fonts (Inter / Poppins)
html
-
Button style guidance
- Color: Green (#10B981).
- Corner radius: 8–12px.
- Text: Bold, white.
- Size: Big. Easy to click.
- Focus ring: Clear, 2px outline.
-
Big green button (HTML/CSS preview)
htmlExtract & Download CSV Large, friendly, accessible
- ASCII button (if images not possible)
╔══════════════════════════════════════╗ ║ Extract & Download CSV ║ ╚══════════════════════════════════════╝
- Accessibility
- aria-label: "Extract and download CSV"
- Keyboard: Enter/Space triggers button. Tab shows focus ring.
Prompt / LangChain / OpenAI usage
Short prompt for extraction (example):
textYou are a careful extraction bot. Read the invoice text below and return ONLY valid JSON. If a value is unknown, omit that key. Expected JSON keys: { "invoice_number": "string", "date": "YYYY-MM-DD", "vendor": "string", "subtotal": 0.0, "tax": 0.0, "total_amount": 0.0, "line_items": [ {"description": "string", "qty": 0, "unit_price": 0.0, "amount": 0.0} ] } Document: {{document_text}}
Short prompt for classification:
textYou classify this document. Return ONLY JSON: {"type": "Invoice" | "Receipt" | "Purchase Order" | "Statement"} Text: {{document_text}}
Example JSON schema for extracted fields:
json{ "invoice_number": "INV-00123", "date": "2025-03-17", "vendor": "Acme Pvt Ltd", "subtotal": 1000.00, "tax": 90.00, "total_amount": 1090.00, "line_items": [ {"description": "Widget A", "qty": 2, "unit_price": 500.00, "amount": 1000.00} ] }
Export / CSV
Sample CSV header:
csvdoc_type,invoice_number,date,vendor,subtotal,tax,total_amount,_filename
Sample row:
csvInvoice,INV-00123,2025-03-17,Acme Pvt Ltd,1000.00,90.00,1090.00,invoice_1.pdf
Local CSV download (Streamlit snippet)
pythonimport pandas as pd import json import streamlit as st # fields is a dict with extracted values df = pd.json_normalize(fields) csv_bytes = df.to_csv(index=False).encode("utf-8") st.download_button( label="Download CSV", data=csv_bytes, file_name="finextract.csv", mime="text/csv" ) st.download_button( label="Download JSON", data=json.dumps(fields, indent=2).encode("utf-8"), file_name="finextract.json", mime="application/json" )
Troubleshooting
- App does not start
- Close old Streamlit tabs. Run the command again.
- Nothing happens after upload
- Click the big button. Wait a few seconds.
- Wrong total
- Check invoice has "Subtotal", "Tax", "Total". Try a clearer PDF.
- Missing invoice number
- Look for "Invoice No" or "INV #" near the top. Try another file.
- OpenAI key issues
- Create and set
OPENAI_API_KEYin your environment, then restart.
- Create and set
FAQ
- Do I need internet?
- Yes, for OpenAI. No for pure regex-only mode.
- Can I use this with Tally?
- Export CSV and import to Tally or other tools.
- Does it read images?
- Focus is PDF. Images may work, but PDF is best.
- Can I add my own fields?
- Yes. Update the schema and UI.
- Is my data safe?
- Keep keys local. Do not share sensitive docs.
Contributing / Contact / License
- Pull requests welcome.
- Open an issue to discuss features.
- License: MIT
MIT line:
MIT License — do what you want, just include the license.
Images & assets
- Put mockups here:
assets/ui-mockup.pngassets/button.png
Folder guide:
project/ assets/ ui-mockup.png button.png
Quick Theme (copy to .streamlit/config.toml)
toml[theme] base = "light" primaryColor = "#10B981" textColor = "#111827" backgroundColor = "#FFFFFF" secondaryBackgroundColor = "#F7F7F8" font = "sans serif"
Minimal requirements.txt
txtstreamlit==1.39.0 openai>=1.40.0 langchain>=0.2.12 pytesseract>=0.3.10 pandas>=2.2.2 pillow>=10.4.0
What to change for production
- Use a secrets manager for
OPENAI_API_KEYand any keys. - Add document redaction and logging controls.
- Add tests with a small set of known PDFs and expected outputs.
If stuck, drop a message — I'll help. 🟢