--- title: Naija Solar emoji: ☀️ colorFrom: yellow colorTo: green sdk: docker app_port: 7860 pinned: true license: mit short_description: Voice-first solar sizing in 5 Nigerian languages tags: - backyard-ai - tiny-titan - off-brand - best-demo - modal - minicpm - nigeria - multilingual - text-to-speech - solar-energy - track:backyard - sponsor:openbmb - sponsor:modal - achievement:offgrid - achievement:welltuned - achievement:offbrand - achievement:llama - achievement:sharing - achievement:fieldnotes models: - Shinzmann/sorotts - hypaai/hypaai_orpheus_v5 - openbmb/MiniCPM-V-2 - Qwen/Qwen3-1.7B - openai/whisper-small - Qwen/Qwen2.5-VL-3B-Instruct datasets: - naijavoices/naijavoices-dataset - google/fleurs - google/WaxalNLP - asr-nigerian-pidgin/nigerian-pidgin-1.0 --- # ☀️ Naija Solar: say your appliances, get your solar system > **Tell it what you own, by voice, by text, or by a photo of your room, in English, Nigerian Pidgin, Yorùbá, Hausa, or Igbo.** Naija Solar sizes the exact panels, inverter, and battery you need over a real Nigerian price catalog, draws your home in **2D and 3D**, and **reads the result back in your language**, with a voice we fine-tuned ourselves. Every model it uses is **under 4 billion parameters.** 🛠️ Self-hosted on **Modal**, scale-to-zero · 🗣️ Custom voice [`Shinzmann/sorotts`](https://huggingface.co/Shinzmann/sorotts) · 🇳🇬 Built in Nigeria 🎥 **[The Gradio app demo](https://youtu.be/l1FhgPJyN44)**  ·  **[the hand-built UI walkthrough](https://youtu.be/PfQeRfNof8Y)**  ·  💻 **[Code on GitHub](https://github.com/Mystique1337/naija-solar)**  ·  📣 **[Launch post on LinkedIn](https://www.linkedin.com/posts/ashinze-emmanuel-5a6757193_buildsmallhackathon-solar-nigeria-ugcPost-7472388380643991552-nDuH/)** [![Naija Solar, the Gradio app](https://img.youtube.com/vi/l1FhgPJyN44/hqdefault.jpg)](https://youtu.be/l1FhgPJyN44) [![Naija Solar, the hand-built UI](https://img.youtube.com/vi/PfQeRfNof8Y/hqdefault.jpg)](https://youtu.be/PfQeRfNof8Y) ![Naija Solar home screen](assets/01_home.png) **▶️ It is a live Gradio app.** Open the Space, choose your language, then speak, type, tap an example, or snap a photo, and it sizes itself. A bespoke single-page edition of the same engine is one tap away at **`/classic`**. --- ## Why it exists Most Nigerian homes run on the grid for only a few hours a day and burn money on petrol generators. Solar fixes this, but **sizing a system is intimidating**: How many panels? What inverter? Which battery? Vendors quote wildly different numbers, and almost none of it is in the languages people actually speak at home. - **About 90 million Nigerians have no reliable electricity.** That is the largest access gap of any country on earth, and the nation spends roughly **14 billion dollars every year** running generators to fill it. ([World Bank](https://www.worldbank.org/en/news/feature/2023/12/15/going-green-scaling-up-access-to-clean-electricity-for-over-17-million-nigerians)) - **More than one in three adults cannot comfortably read** a vendor quote or a spec sheet. National adult literacy sits near 62 percent, and far lower in parts of the north. ([World Bank data](https://data.worldbank.org/indicator/SE.ADT.LITR.ZS?locations=NG)) - **English shuts most people out.** Nigeria is home to more than 500 languages, and tens of millions live their whole day in Hausa, Yorùbá, Igbo, or Pidgin, the very languages solar is almost never explained in. - **The knowledge gap is the real wall.** Even people who can afford a system stall at the same three questions: how many panels, what size inverter, which battery. The answers hide behind kVA jargon and quotes that disagree with each other. Naija Solar turns *"I get one fridge, two fans, and six bulbs,"* spoken in any of five languages, into a costed, installer-ready plan in seconds. It goes after the part technology usually skips: not the hardware, but the **understanding**. ## What it does | Step | How | |---|---| | **1. Tell it your load** | 🎤 Speak it, ⌨️ type it, tap an example, or 📷 snap a photo of your room | | **2. It understands you** | Choose your language (EN, Pidgin, Yorùbá, Hausa, Igbo); speech recognition; typo-tolerant parsing ("frige" becomes fridge); a vision model reads appliances from photos and shows you what it spotted | | **3. It sizes the system** | A **deterministic engine** computes daily kWh, peak and surge load, panel array, inverter kVA, and battery bank. Exact Python, never a model guess | | **4. It shows you** | A premium **2D** infographic and an interactive **3D** cut-away of your home, a 24-hour sun-vs-usage chart, and ₦ cost cards over a real vendor catalog | | **5. It explains, in writing and aloud** | The plan appears **in words instantly**, then the **same words are read aloud** in your language. Then a chat box answers "why these panels?" or "can I run my AC at night?" | ![Speak, type, tap an example, or snap a photo](assets/02_input.png) ![A sized result: daily energy, inverter, cost, and the exact panels, inverter, and battery](assets/03_result.png) A clean 2D diagram and an interactive 3D cut-away of your specific home: ![2D diagram of the home and power system](assets/04_view2d.png) ![3D cut-away with panels on the roof and appliances inside](assets/05_home3d.png) The plan in writing, then read aloud in your language: ![The written plan, then read aloud](assets/06_narration.png) ## 🧠 Models: every one is under 4B (Tiny Titan) | Role | Model | Params | |---|---|---| | Text (Q&A + free-text understanding) | `Qwen/Qwen3-1.7B` | **1.7B** | | Speech to text | `openai/whisper-small` | **0.24B** | | Voice, all 5 languages | **[`Shinzmann/sorotts`](https://huggingface.co/Shinzmann/sorotts)**, our Orpheus-3B fine-tune | **3B** | | Vision (appliances from a photo) | `openbmb/MiniCPM-V-2` (OpenBMB MiniCPM) | **3.4B** | The largest single model is **3.4B** (MiniCPM-V), comfortably under the 4B Tiny Titan line. Qwen2.5-VL-3B is kept as a drop-in vision fallback. Everything is self-hosted on **Modal**, where each piece wakes on demand and scales to zero when idle. **A voice we built.** Off-the-shelf TTS for Nigerian languages is either robotic or absent, so we fine-tuned **Orpheus-3B** on Yorùbá, Hausa, Igbo, and Nigerian Pidgin, a single LoRA adapter over 31,574 clips from NaijaVoices, WAXAL, FLEURS, BibleTTS, and the Nigerian Pidgin corpus. The result, [`Shinzmann/sorotts`](https://huggingface.co/Shinzmann/sorotts), is native and natural, still under 4B, and the whole fine-tune runs as one Modal job. For each Nigerian language the spoken plan is phrased for the ear, with counts read as proper number words, so it never code-switches into English digits. ## 🏗️ Architecture ![How a request flows through Naija Solar, in five steps](assets/flow.png) The part you cannot afford to get wrong, the maths, **never touches a language model**. A free CPU Hugging Face Space holds the interface, the parser, the deterministic engine, and the price catalogue, and draws the 2D and 3D on your device. It calls a handful of small open models on Modal only to hear, see, and speak, and a persistent cache keeps voice clips between restarts. The models scale to zero when idle, so the app warms all of them the moment you open it, and the first request after a lull takes a few seconds. ![A free CPU front end calling small open models on Modal](assets/arch.png) ## 🏆 How it maps to the prize pool - **Track, Backyard AI:** a practical, problem-solving app for real Nigerian households. - **🏅 Tiny Titan:** every model is under 4B. Big impact from small weights. - **🎨 Off Brand:** a fully custom interface (warm "solar" design system, Space Grotesk and Inter, a signature 24-hour chart, a procedural Three.js dollhouse). Nothing is left of the default framework look. - **🔌 OpenBMB, Best MiniCPM Build:** **OpenBMB's MiniCPM-V-2** powers the photo reader, point your phone at an appliance or its rating label and it lists what you run, so a user who cannot easily type still gets a full solar plan. Kept under the 4B line, self-hosted on Modal, scale-to-zero. - **⚡ Modal, Best Use of Modal:** the entire model stack, including a from-scratch TTS fine-tune, is self-hosted on Modal, scale-to-zero. - **🎬 Best Demo:** voice-first, multilingual, with a 2D and 3D payoff that films well, and a voice we trained ourselves. - **Community:** an in-app usage counter, feedback, ratings with the language used, and an optional email list. ## ✨ Features - 🎤 **Voice-first** input, plus type, example, and photo paths, across 5 languages. - 📝 **Written plan, instantly**, then read aloud in the same words, so a slow voice never blocks you. - 📷 **Photo read-back.** It shows exactly which appliances it spotted, so you can confirm or fix them. - 🔄 **Size another system** in one tap, without losing your place. - 🏠 **2D and 3D** of your specific home; a signature 24-hour solar-vs-load chart. - 💬 **Cached Q&A chat** grounded only in your plan. - 👤 **Accounts, optional and never a wall.** Sign in and your sizings save automatically, ready to reopen and compare. - ⭐ **Reviews.** Anyone can leave a review on the public wall, shown with the language they used. - 🌗 **Light and dark mode**, remembered across visits. - 🛒 **Real vendor catalog** with practical recommendations. ![Sign in to save your sizings, kept automatically as you size](assets/09_account.png) ![Leave a review others can read](assets/10_reviews.png) ![Dark mode](assets/07_dark.png) ## ▶️ Run locally ```bash pip install -r requirements.txt # Works immediately on the deterministic core (sizing, 2D/3D, recs) with a dev mock: uvicorn server:app --host 0.0.0.0 --port 7860 # → http://127.0.0.1:7860 ``` To self-host the models, `modal deploy` each file in `modal/` (`serving_vllm.py`, `serving_whisper.py`, `serving_tts.py`, `serving_vision.py`) and point the `BUILDSMALL_*_BASE_URL` env vars at the printed URLs. Keep the voice warm (`MIN_CONTAINERS=1`) before filming so there are no cold-start pauses. Full instructions and the SoroTTS training pipeline are in the [GitHub repo](https://github.com/Mystique1337/naija-solar). ## ⚖️ Ethics and limits Estimates only. Every output says **confirm with a licensed installer**. Prices are current Nigerian bands and will drift over time. Counts, feedback, and any emails are kept in a private HF Dataset; only aggregate counts are ever shown, and email is always optional. SoroTTS is for accessibility, not for cloning any real person's voice. --- *Built for the Build Small Hackathon (Gradio and Hugging Face). Thinking small, on purpose.*