metadata
title: Swahili Text Model
emoji: π
colorFrom: blue
colorTo: green
sdk: docker
app_port: 7860
pinned: false
Swahili Content Generation
This Hugging Face Space provides an AI-powered tool for generating educational content in Swahili for primary school students in grades 3 and 4. The system uses a Retrieval-Augmented Generation (RAG) approach to create accurate and contextually relevant educational materials.
Features
- Generate educational content for Math and Science subjects
- Support for grades 3 and 4
- Three different content styles: normal, simple, and creative
- RAG-based approach for accurate and contextually relevant content
- Easy-to-use interface
How to Use
- Select the grade level (3 or 4)
- Choose the subject (Math or Science)
- Enter a topic (e.g., "namba", "mazingira", "vipimo", etc.)
- Select a style (normal, simple, or creative)
- Click "Generate Content"
Available Topics
Grade 3 Science
- mazingira (Environment)
- nishati (Energy)
- maada (Matter)
- mawasiliano (Communication)
- usafi (Cleanliness)
- vipimo (Measurements)
- mlo (Nutrition)
- mfumo (Systems)
- maambukizi (Infections)
- huduma (Services)
- vifaa (Equipment)
Grade 4 Science
- kinga (Immunity)
- magonjwa (Diseases)
- majaribio (Experiments)
- maji (Water)
- ukimwi (HIV/AIDS)
- huduma (Services)
- mazingira (Environment)
- nishati (Energy)
- mfumo (Systems)
- mawasiliano (Communication)
Grade 3 Math
- namba (Numbers)
- mpangilio (Arrangement)
- matendo (Operations)
- sehemu (Fractions)
- maumbo (Shapes)
- vipimo (Measurements)
- fedha (Money)
- takwimu (Statistics)
Grade 4 Math
- kugawanya (Division)
- kujumlisha (Addition)
- kuzidisha (Multiplication)
- namba (Numbers)
- kirumi (Roman Numerals)
- wakati (Time)
- mpangilio (Arrangement)
- vipimo (Measurements)
- takwimu (Statistics)
- kutoa (Subtraction)
- fedha (Money)
- sehemu (Fractions)
- maumbo (Shapes)
Technical Details
This application uses:
- Meta's Llama-3.2-3B-Instruct model for text generation
- FAISS for efficient vector similarity search
- SentenceTransformers for text embeddings
- FastAPI for the backend API
- Gradio for the user interface
The system employs a Retrieval-Augmented Generation (RAG) approach, which enhances the language model's output by retrieving relevant information from a curated database of educational materials in Swahili.