Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,39 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# Invoice-Flow AI
|
| 2 |
|
| 3 |
-
Agentic invoice verification
|
| 4 |
|
| 5 |
-
|
| 6 |
-
Invoice-Flow AI automates invoice verification using:
|
| 7 |
- Multimodal AI (Gemini 1.5 Flash)
|
| 8 |
- Human-in-the-loop buyer consent
|
| 9 |
- Blockchain-based replay protection
|
| 10 |
|
| 11 |
-
The system prevents invoice fraud and double-financing while reducing verification
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
|
| 14 |
-
- **AI Perception:** Gemini 1.5 Flash extracts structured data from PDFs
|
| 15 |
-
- **Consent Layer:** Buyer approval (simulated in demo)
|
| 16 |
-
- **Settlement Layer:** Polygon smart contract enforces finality
|
| 17 |
|
| 18 |
## π Tech Stack
|
| 19 |
-
|
|
|
|
| 20 |
- Google Gemini 1.5 Flash
|
| 21 |
- Web3.py
|
| 22 |
- Polygon Amoy Testnet
|
| 23 |
|
|
|
|
|
|
|
| 24 |
## π Secrets Required (Hugging Face)
|
| 25 |
-
|
|
|
|
|
|
|
| 26 |
- `GEMINI_API_KEY`
|
| 27 |
- `RPC_URL`
|
| 28 |
- `PRIVATE_KEY`
|
| 29 |
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
3. Buyer approves
|
| 34 |
-
4. Mint receipt on-chain
|
| 35 |
-
5. View transaction on PolygonScan
|
| 36 |
|
| 37 |
## β οΈ Disclaimer
|
|
|
|
| 38 |
This is a hackathon prototype.
|
| 39 |
-
Production
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Invoice-Flow AI
|
| 3 |
+
emoji: π
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: purple
|
| 6 |
+
sdk: streamlit
|
| 7 |
+
sdk_version: "1.31.1"
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
# Invoice-Flow AI
|
| 13 |
|
| 14 |
+
**Agentic invoice verification & on-chain trust registry**
|
| 15 |
|
| 16 |
+
Invoice-Flow AI is a hackathon prototype that automates invoice verification using:
|
|
|
|
| 17 |
- Multimodal AI (Gemini 1.5 Flash)
|
| 18 |
- Human-in-the-loop buyer consent
|
| 19 |
- Blockchain-based replay protection
|
| 20 |
|
| 21 |
+
The system prevents invoice fraud and double-financing while reducing verification costs from βΉ500+ to under βΉ5 per invoice.
|
| 22 |
+
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
## π Demo Flow
|
| 26 |
+
|
| 27 |
+
1. Upload an invoice PDF
|
| 28 |
+
2. AI extracts structured data
|
| 29 |
+
3. Buyer approval (simulated UI)
|
| 30 |
+
4. Verified receipt minted on Polygon
|
| 31 |
+
5. Transaction visible on PolygonScan
|
| 32 |
+
|
| 33 |
+
---
|
| 34 |
+
|
| 35 |
+
## π§ Architecture Overview
|
| 36 |
+
|
| 37 |
+
- **AI Layer:** Gemini 1.5 Flash (PDF β JSON)
|
| 38 |
+
- **Consent Layer:** Buyer approval UI (Webhook-ready)
|
| 39 |
+
- **Settlement Layer:** Polygon Amoy (EVM-compatible)
|
| 40 |
+
- **Security:** SHA-256 hashing for replay protection
|
| 41 |
|
| 42 |
+
---
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
## π Tech Stack
|
| 45 |
+
|
| 46 |
+
- Streamlit
|
| 47 |
- Google Gemini 1.5 Flash
|
| 48 |
- Web3.py
|
| 49 |
- Polygon Amoy Testnet
|
| 50 |
|
| 51 |
+
---
|
| 52 |
+
|
| 53 |
## π Secrets Required (Hugging Face)
|
| 54 |
+
|
| 55 |
+
Add the following in **Settings β Variables**:
|
| 56 |
+
|
| 57 |
- `GEMINI_API_KEY`
|
| 58 |
- `RPC_URL`
|
| 59 |
- `PRIVATE_KEY`
|
| 60 |
|
| 61 |
+
β οΈ Do NOT commit secrets to the repository.
|
| 62 |
+
|
| 63 |
+
---
|
|
|
|
|
|
|
|
|
|
| 64 |
|
| 65 |
## β οΈ Disclaimer
|
| 66 |
+
|
| 67 |
This is a hackathon prototype.
|
| 68 |
+
Production deployments would replace UI consent with secure webhooks and cryptographic buyer signatures.
|