SmartSplit-BillAI is a production-ready prototype that streamlines the process of splitting restaurant or shopping bills among multiple people. By integrating a conversational AI agent with an OCR-free receipt extraction model, the application ensures fair, transparent, and accurate cost distribution based on individual orders rather than equal division.
- Conversational AI Agent — Built with Agno and Groq's LLM inference, the agent guides users through the bill-splitting process in natural language.
- OCR-Free Receipt Extraction — Leverages Pix2Struct from Google to extract total amounts, dates, and line items directly from receipt images without traditional OCR engines.
- Proportional Cost Calculation — Tax, tip, and discounts are distributed proportionally based on each person's share of the subtotal, not simply divided equally.
- Interactive Web Interface — Clean, responsive UI built with Streamlit, featuring both a quick calculator and a chat-based interaction mode.
- Receipt Upload & Analysis — Users can upload receipt photos, have the AI automatically extract relevant data, and proceed directly to splitting.
- Input: Users describe their bill verbally (e.g., "Budi ordered Nasi Goreng 45k, Ani ordered Sate 60k") or upload a receipt photo.
- Extraction (if receipt uploaded): The Pix2Struct model answers targeted questions about the receipt content (total, items, date).
- Calculation: The AI agent computes each person's total by:
- Summing their ordered items
- Adding proportional tax and tip
- Subtracting proportional discounts
- Output: A detailed breakdown is presented in a formatted table, ensuring all individual payments sum exactly to the total bill.
| Layer | Technology |
|---|---|
| Frontend | Streamlit |
| AI Orchestration | Agno (Agent framework) |
| LLM Inference | Groq Cloud (Llama 3.3 70B) |
| Document Understanding | Pix2Struct (Google, Hugging Face) |
| Backend Logic | Python, custom calculator module |
| Deployment | Streamlit Cloud / Hugging Face Spaces |
SmartSplit-BillAI
├── app.py # Streamlit UI
├── ai_agent.py # AI agent configuration
├── utils.py # Split bill calculator class
├── receipt_extractor.py # Pix2Struct inference wrapper
├── requirements.txt # Python dependencies
├── .env.example # Environment variables template
├── .gitignore
└── receipts/ # Sample receipt images (optional)
- Python 3.10+
- A Groq API key (get one free)
Two OCR-free models were evaluated for receipt extraction:
- Donut (naver-clova-ix/donut-base-finetuned-cord-v2): Produced garbled output on Indonesian receipts.
- Pix2Struct (google/pix2struct-docvqa-base): Successfully extracted key information despite language and layout variations.
Pix2Struct was selected for the prototype due to its superior qualitative performance and flexible question-answering capability.
###Installation
git clone https://github.com/USERNAME/smart-split-bill-ai.git
cd smart-split-bill-ai
python -m venv venv
venv\Scripts\activate.bat
pip install -r requirements.txt