--- title: Invoice-Flow AI emoji: 📄 colorFrom: blue colorTo: purple sdk: streamlit sdk_version: "1.31.1" app_file: app.py pinned: false --- # Invoice-Flow AI **Agentic invoice verification & on-chain trust registry** Invoice-Flow AI is a hackathon prototype that automates invoice verification using: - Multimodal AI (Gemini 1.5 Flash) - Human-in-the-loop buyer consent - Blockchain-based replay protection The system prevents invoice fraud and double-financing while reducing verification costs from ₹500+ to under ₹5 per invoice. --- ## 🚀 Demo Flow 1. Upload an invoice PDF 2. AI extracts structured data 3. Buyer approval (simulated UI) 4. Verified receipt minted on Polygon 5. Transaction visible on PolygonScan --- ## 🧠 Architecture Overview - **AI Layer:** Gemini 1.5 Flash (PDF → JSON) - **Consent Layer:** Buyer approval UI (Webhook-ready) - **Settlement Layer:** Polygon Amoy (EVM-compatible) - **Security:** SHA-256 hashing for replay protection --- ## 🛠 Tech Stack - Streamlit - Google Gemini 1.5 Flash - Web3.py - Polygon Amoy Testnet --- ## 🔐 Secrets Required (Hugging Face) Add the following in **Settings → Variables**: - `GEMINI_API_KEY` - `RPC_URL` - `PRIVATE_KEY` ⚠️ Do NOT commit secrets to the repository. --- ## ⚠️ Disclaimer This is a hackathon prototype. Production deployments would replace UI consent with secure webhooks and cryptographic buyer signatures.