File size: 1,447 Bytes
106ce91
 
 
 
 
 
 
 
 
 
 
6a547a7
 
106ce91
6a547a7
106ce91
6a547a7
 
 
 
106ce91
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6a547a7
106ce91
6a547a7
 
106ce91
 
6a547a7
 
 
 
106ce91
 
6a547a7
106ce91
 
 
6a547a7
 
 
 
106ce91
 
 
6a547a7
 
106ce91
6a547a7
106ce91
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
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.