Joshua-Abok commited on
Commit
ec00bec
Β·
1 Parent(s): 863ac13

docs: update README with HF Space instructions and badge targets

Browse files
Files changed (1) hide show
  1. README.md +84 -39
README.md CHANGED
@@ -1,50 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
- title: Build Small App
3
- emoji: 🌳
4
- colorFrom: green
5
- colorTo: blue
6
- sdk: gradio
7
- app_file: app.py
8
- pinned: false
9
- license: mit
10
- short_description: A small (<=32B) model app for the Build Small Hackathon
 
 
 
11
  ---
12
 
13
- # 🌳 Build Small App
14
 
15
- Starter scaffold for the [Build Small Hackathon](https://huggingface.co/build-small-hackathon).
16
- A streaming Gradio chat backed by a **≀32B** model via Hugging Face Inference β€” a
17
- known-good base to reshape into your real idea.
 
 
18
 
19
- > The YAML header above is the Hugging Face **Space config**. `sdk_version` is
20
- > omitted on purpose so the Space uses the latest Gradio. Pin it later if needed.
 
 
 
 
 
 
21
 
22
- ## Pick a track
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
- ## Configuration (Space β†’ Settings β†’ Variables and secrets)
34
- | Name | Purpose | Default |
35
- |----------------|------------------------------------------------------|-----------------------------|
36
- | `HF_TOKEN` | secret; auto-injected in a Space | β€” |
37
- | `MODEL_ID` | the **≀32B** model to call | `Qwen/Qwen2.5-7B-Instruct` |
38
- | `SYSTEM_PROMPT`| the assistant's persona/instructions | generic helper |
39
- | `BASE_URL` | optional OpenAI-compatible endpoint (Modal/NVIDIA) | unset β†’ HF Inference |
40
-
41
- ## Customization checklist
42
- - [ ] Lock the idea + track; rewrite `title`, `emoji`, `short_description`.
43
- - [ ] Set `SYSTEM_PROMPT` (or hardcode it) for your use case.
44
- - [ ] Reshape the UI in `app.py` from a generic chat into your real app.
45
- - [ ] Confirm the model is **≀32B** (rule).
46
- - [ ] Deploy to a Space, then iterate on any build errors.
47
- - [ ] Record a demo video + write the social post.
48
-
49
- ## Deliverables (due June 15, 2026)
50
- Gradio Space (in the hackathon org) Β· demo video Β· social media post.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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