KayO Codex commited on
Commit
dc0d6a3
·
1 Parent(s): d3600ba

Prepare hackathon README submission details

Browse files

Co-authored-by: Codex <codex@openai.com>

Files changed (2) hide show
  1. .env.example +1 -0
  2. README.md +34 -8
.env.example ADDED
@@ -0,0 +1 @@
 
 
1
+ HF_TOKEN=huggingface_token_goes_here # ref: https://huggingface.co/docs/hub/en/security-tokens
README.md CHANGED
@@ -9,19 +9,31 @@ python_version: '3.12'
9
  app_file: app.py
10
  pinned: false
11
  short_description: Simplify complex legislation that affects you!
 
 
 
12
  models:
13
  - Qwen/Qwen3-14B
 
14
  ---
15
 
16
  # Legislation Explainer
17
 
18
  Legislation Explainer is a Gradio app for helping regular people understand public-interest legislation and how it affects them.
19
 
 
 
 
 
 
 
 
 
20
  ## Motivation
21
 
22
- In May of 2026, there was a huge public outcry online through the Ghana 🇬🇭 X (formerly twitter) community over the contents of a draft bill (the NITA bill) proposed by the nation's Ministry of Communication, Digital Technology and Innovations. The draft bill, and 14 others, had been around for well over 6 months, but being shrouded in legalese, not many regualr folks in the developer ecosystem had taken note of it. When we found out that it contained proposals for exorbitant licensing fees and taxes on revenue (yes, revenue, not profit) of startups, and restrictions on co-founding tech companies with foreign nationals, everyone panicked and things got really tense between the tech community and the ministry.
23
 
24
- This project is my attempt tp help civic groups, technologists, journalists, students, entrepreneurs, policy watchers, and regualr people understand legislation as soon as they come across it.
25
 
26
  It is created for the Hugging Face Build Small Hackathon under the `Backyard AI` track: a practical, small-model assistant for people who need to understand a real bill quickly without reading every clause first.
27
 
@@ -29,9 +41,17 @@ It is created for the Hugging Face Build Small Hackathon under the `Backyard AI`
29
 
30
  - Track: `Backyard AI`
31
  - Real user: Ghanaian citizens and digital-policy stakeholders who need a clearer view of a bill's practical effects.
32
- - Small-model constraint: default generation uses `Qwen/Qwen3-14B:cheapest` through the Hugging Face router, staying within the hackathon's `<= 32B` model cap while keeping deployment simple.
33
  - Required surface: Gradio app, ready for Hugging Face Spaces through `app.py`.
34
- - GitHub repo: https://github.com/KayO-GH/legislation-explainer
 
 
 
 
 
 
 
 
35
 
36
  ## What It Does
37
 
@@ -48,17 +68,23 @@ It is created for the Hugging Face Build Small Hackathon under the `Backyard AI`
48
 
49
  ## Model And Provider Notes
50
 
51
- The hackathon-safe default is Qwen3 14B through the Hugging Face router.
52
 
53
- - Default generator: `Qwen/Qwen3-14B:cheapest`
 
54
  - Default credential path: `HF_TOKEN`
55
  - Default provider: `qwen`
 
 
 
56
 
57
  ## Local Run
58
 
59
  ```bash
60
- pip install -r requirements.txt
61
- python app.py
 
 
62
  ```
63
 
64
  Set these environment variables for the default Qwen path:
 
9
  app_file: app.py
10
  pinned: false
11
  short_description: Simplify complex legislation that affects you!
12
+ tags:
13
+ - track:backyard
14
+ - sponsor:openai
15
  models:
16
  - Qwen/Qwen3-14B
17
+ - sentence-transformers/all-MiniLM-L6-v2
18
  ---
19
 
20
  # Legislation Explainer
21
 
22
  Legislation Explainer is a Gradio app for helping regular people understand public-interest legislation and how it affects them.
23
 
24
+ ## Links
25
+
26
+ - Hugging Face Space: https://huggingface.co/spaces/build-small-hackathon/legislation-explainer
27
+ - Live app: https://build-small-hackathon-legislation-explainer.hf.space/
28
+ - GitHub repo: https://github.com/KayO-GH/legislation-explainer
29
+ - Demo video: pending final submission link
30
+ - Social post: pending final submission link
31
+
32
  ## Motivation
33
 
34
+ In May 2026, the Ghana tech community on X/Twitter reacted strongly to the contents of a draft National Information Technology Authority bill proposed by the Ministry of Communication, Digital Technology and Innovations. The draft bill, and 14 others, had been public for months, but the legal language made it hard for many people in the developer ecosystem to evaluate quickly. When people noticed proposals around licensing fees, revenue-based charges, and restrictions affecting company formation, the discussion became urgent.
35
 
36
+ This project is my attempt to help civic groups, technologists, journalists, students, entrepreneurs, policy watchers, and regular people understand legislation as soon as they come across it.
37
 
38
  It is created for the Hugging Face Build Small Hackathon under the `Backyard AI` track: a practical, small-model assistant for people who need to understand a real bill quickly without reading every clause first.
39
 
 
41
 
42
  - Track: `Backyard AI`
43
  - Real user: Ghanaian citizens and digital-policy stakeholders who need a clearer view of a bill's practical effects.
44
+ - Small-model constraint: each model used by the app is individually below the hackathon's `<= 32B` cap.
45
  - Required surface: Gradio app, ready for Hugging Face Spaces through `app.py`.
46
+
47
+ ## Try The Demo
48
+
49
+ 1. Open the live app.
50
+ 2. Paste this public NITA bill URL into `Document URL`: `https://moc.gov.gh/wp-content/uploads/2023/03/NITA-NATIONAL-INFORMATION-TECHNOLOGY-AUTHORITY-BILL_-10-07-25.pdf`.
51
+ 3. Click `Run analysis` to load the precomputed example analysis.
52
+ 4. Ask a follow-up question such as `What should startup founders pay attention to first?`.
53
+
54
+ _**Note:** The ministry's website does not have consistent uptime. In the event that the file cannot be accessed from the site, you can [download it from here](https://drive.google.com/file/d/1P-cvgp-bX42QU2zijRPpmnE-MNPgXuGD/view?usp=sharing). Aslo feel free to experiment with any relevant documents you have. Nothing is saved beyond a session._
55
 
56
  ## What It Does
57
 
 
68
 
69
  ## Model And Provider Notes
70
 
71
+ The hackathon-safe default is Qwen3 14B through the Hugging Face router, with a small embedding model for retrieval.
72
 
73
+ - Default generator: `Qwen/Qwen3-14B`
74
+ - Embeddings and chunk retrieval: `sentence-transformers/all-MiniLM-L6-v2`
75
  - Default credential path: `HF_TOKEN`
76
  - Default provider: `qwen`
77
+ - Parameter disclosure: `Qwen3-14B` is under 32B, and `all-MiniLM-L6-v2` is far below the cap at ~22.7M.
78
+
79
+ _A smaller Qwen model could have been used successfully, but considering the real-world importance, a model with a higher capactity for reasoning is desired._
80
 
81
  ## Local Run
82
 
83
  ```bash
84
+ # activate virtual env
85
+ pip install -r requirements.txt # alternatively, uv sync to install from pyproject.toml
86
+ source .venv/bin/activate
87
+ gradio app.py # alternatively, uv run gradio app.py
88
  ```
89
 
90
  Set these environment variables for the default Qwen path: