DEV Community

Shambhavi Chourasia
Shambhavi Chourasia

Posted on

Automating Reciept Sorting For The "Slow And Steady"Challenge

Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady Submission 🦥

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady

What I Built

Sloths have the right idea: why do manual work when you can automate it? For this week's theme, I upgraded my local receipt extractor into a Bulk Receipt Sorter.

Instead of uploading invoices one by one, freelancers and small business owners can now upload 10+ receipts at once. My app extracts the Vendor Name, Date, and Amount from all of them and compiles them into a single CSV file (which opens in Excel) ready for their accountant. This truly "rewards laziness" by saving hours of manual data entry.

Demo

Bulk Reciept Sorter App Interface
Exported Data In Excel/CSV

Code

Since this is a local Python app running via Streamlit, here is the core logic that handles the bulk processing and CSV generation:

python

Core loop for bulk processing

for i, uploaded_file in enumerate(uploaded_files):
image = Image.open(uploaded_file)
extracted_text = pytesseract.image_to_string(image)

prompt = f"Extract Vendor, Date, Total Amount from: {extracted_text}"
response = ollama.chat(model='llama3', messages=[{'role': 'user', 'content': prompt}])

Append to dataframe...

Enter fullscreen mode Exit fullscreen mode




How I Built It

· UI: Streamlit (Python)
· OCR: Tesseract OCR (to read text from images)
· AI Engine: Ollama running Llama 3 locally. No cloud APIs were used.
· Data handling: Pandas (for creating the downloadable CSV).

The app loops through all uploaded images, extracts the raw text, asks the local Llama 3 model to structure it, and builds a downloadable table.

Why Does Open Innovation Matter?

Because this process involves hundreds of receipts over a month, using a paid cloud API (like OpenAI) would cost a lot of money and take a long time due to network requests.
By using Ollama to run Llama 3 locally:

  1. It's 100% Free: I can process 500 receipts and it won't cost a single rupee in API fees. No token limits.
  2. Privacy: Freelancers don't want to send 50 images of their client bills to a cloud server. This runs completely offline on the laptop.
  3. Speed: No internet lag. The AI processes the images directly on the local CPU.

The Lazy Payoff

This app saves a freelancer hours of tedious data entry. Instead of opening 50 PDFs and typing numbers into Excel, they can dump all 50 images into this app, click one button, and download a ready-to-use Excel sheet.

Prize Categories

I am entering the Open Source AI category.

Top comments (0)