Commit Β·
ec00bec
1
Parent(s): 863ac13
docs: update README with HF Space instructions and badge targets
Browse files
README.md
CHANGED
|
@@ -1,50 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
-
#
|
| 14 |
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
-
##
|
| 23 |
-
- **Backyard AI** β solve a real problem for someone you know.
|
| 24 |
-
- **Thousand Token Wood** β build something delightful / creative.
|
| 25 |
|
| 26 |
-
## Run locally (on the VM)
|
| 27 |
```bash
|
| 28 |
-
python -m venv .venv && source .venv/bin/activate
|
| 29 |
pip install -r requirements.txt
|
| 30 |
-
HF_TOKEN=hf_xxx python app.py # opens on http://0.0.0.0:7860
|
| 31 |
```
|
| 32 |
|
| 33 |
-
##
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# π Sidewalk FM β Small Trader Ledger & Advisory
|
| 2 |
+
|
| 3 |
+
**Hackathon Entry**
|
| 4 |
+
HuggingFace Build Small Hackathon 2025 β Backyard AI track
|
| 5 |
+
π Tiny Titan ($1,000) + Best Agent ($1,000) + Off Brand ($1,500) + Backyard AI track
|
| 6 |
+
|
| 7 |
+
> "What's your biggest expense today?"
|
| 8 |
+
> "I spent 500 shillings on mangoes, but I don't know if I'm making a profit."
|
| 9 |
+
|
| 10 |
+
**Sidewalk FM** helps small traders track purchases, sales, and margins in plain English.
|
| 11 |
+
It's for the person who runs a shop on the street β not the accountant.
|
| 12 |
+
|
| 13 |
---
|
| 14 |
+
|
| 15 |
+
## π§ Models Used
|
| 16 |
+
|
| 17 |
+
| Role | Model | Size | Provider | Badge Eligible |
|
| 18 |
+
|------|-------|------|----------|----------------|
|
| 19 |
+
| **Extraction** | `nvidia/nemotron-mini-4b-instruct` | 4B | NVIDIA NIM | β
Tiny Titan |
|
| 20 |
+
| **Advisory** | `Qwen/Qwen2.5-3B-Instruct` | 3B | Modal vLLM | β
Tiny Titan |
|
| 21 |
+
| **Total** | β | **β€7B** | β | β
Tiny Titan |
|
| 22 |
+
|
| 23 |
+
All models are β€4B β **Tiny Titan badge eligible**
|
| 24 |
+
All models are β€32B β **Hackathon rules satisfied**
|
| 25 |
+
|
| 26 |
---
|
| 27 |
|
| 28 |
+
## π§© Features
|
| 29 |
|
| 30 |
+
- **Natural Language Input:** "bought 50 mangoes at 200 shillings each from Mike"
|
| 31 |
+
- **Structured Ledger:** Transactions parsed and stored with full metadata
|
| 32 |
+
- **Margin Tracking:** Revenue, costs, profit calculated automatically
|
| 33 |
+
- **AI Advisory:** Get actionable advice on inventory and pricing
|
| 34 |
+
- **Custom UI:** Not a chatbot β a ledger for small traders
|
| 35 |
|
| 36 |
+
---
|
| 37 |
+
|
| 38 |
+
## π¦ Deployment
|
| 39 |
+
|
| 40 |
+
This is a Gradio app with two model backends:
|
| 41 |
+
|
| 42 |
+
1. **NVIDIA NIM API** (for structured extraction)
|
| 43 |
+
2. **Modal vLLM** (for advisory + conversation)
|
| 44 |
|
| 45 |
+
### Requirements
|
|
|
|
|
|
|
| 46 |
|
|
|
|
| 47 |
```bash
|
|
|
|
| 48 |
pip install -r requirements.txt
|
|
|
|
| 49 |
```
|
| 50 |
|
| 51 |
+
### Run Locally
|
| 52 |
+
|
| 53 |
+
```bash
|
| 54 |
+
python app_sidewalk_fm.py
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
### Deploy to HF Spaces
|
| 58 |
+
|
| 59 |
+
1. Push to a repo (this one)
|
| 60 |
+
2. Create Space with `gradio` runtime
|
| 61 |
+
3. Point to `app_sidewalk_fm.py`
|
| 62 |
+
4. Add API keys to Secrets: `NVIDIA_NIM_API_KEY`
|
| 63 |
+
|
| 64 |
+
---
|
| 65 |
+
|
| 66 |
+
## π― Badges Targeted
|
| 67 |
+
|
| 68 |
+
| Badge | Status |
|
| 69 |
+
|-------|--------|
|
| 70 |
+
| **Backyard AI** | β
Track real-world problems |
|
| 71 |
+
| **Tiny Titan** | β
β€4B models |
|
| 72 |
+
| **Best Agent** | β
Multi-step tool use (parse β ledger β analyze β advise) |
|
| 73 |
+
| **Off Brand** | β
Custom ledger UI |
|
| 74 |
+
| **Best Demo** | β
Story + video + social post |
|
| 75 |
+
| **NVIDIA Sponsor** | β
Nemotron Parse used |
|
| 76 |
+
| **Modal Sponsor** | β
Modal vLLM used |
|
| 77 |
+
|
| 78 |
+
---
|
| 79 |
+
|
| 80 |
+
## π§ͺ Test the App
|
| 81 |
+
|
| 82 |
+
Try these sample inputs:
|
| 83 |
+
- `bought 50 mangoes at 200 shillings each from Mike`
|
| 84 |
+
- `sold 20 mangoes at 250 shillings each`
|
| 85 |
+
- `returned 5 oranges at 100 shillings each`
|
| 86 |
+
|
| 87 |
+
Then click "Get AI Advice" to see insights like:
|
| 88 |
+
- "You're selling mangoes below cost. Reduce price to 220."
|
| 89 |
+
- "Your inventory of oranges is negative. Check receipts."
|
| 90 |
+
|
| 91 |
+
---
|
| 92 |
+
|
| 93 |
+
## π License
|
| 94 |
+
|
| 95 |
+
MIT
|