Swahili Spam Detection
# Swahili Spam Detection
A Flask-based web application for detecting spam messages in Swahili communications using machine learning. Maintains clean communication channels with real-time analysis and user feedback capabilities.
## Features
- Real-time Swahili message spam detection
- User authentication system
- Feedback submission and storage
- Message history tracking
- Machine learning model integration
- Responsive web interface
## Technical Stack
- **Backend**: Python/Flask
- **Frontend**: HTML5, CSS3, JavaScript
- **Machine Learning**: scikit-learn (Pickle model)
- **Data Storage**: JSON (users & feedback)
- **Styling**: Custom CSS with Flexbox layout
- **Deployment**: WSGI compatible
## Project Structure
```bash
├── ssd/
│ ├── db/ # JSON databases
│ │ ├── feedback.json
│ │ └── users.json
│ ├── logs/ # Application logs
│ ├── model/ # ML models
│ │ ├── newlyTrainedModel_27_jan_25/
│ │ └── swahiliSpamDetectionModel.pkl
│ ├── static/ # Static assets
│ │ ├── assets/ # Images
│ │ ├── js/ # JavaScript modules
│ │ ├── styles/ # CSS files
│ │ └── sweetalert/ # Alert library
│ ├── templates/ # Flask templates
│ │ ├── 404.html
│ │ ├── index.html
│ │ └── login.html
│ ├── app.py # Main application
│ ├── wsgi.py # WSGI entry point
│ └── requirements.txt # Dependencies
```
## Getting Started
### Prerequisites
- Python 3.8+
- pip package manager
- Modern web browser
### Installation
1. Clone the repository
```bash
git clone
github.com
cd ssd
```
2. Create virtual environment
```bash
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
```
3. Install dependencies
```bash
pip install -r requirements.txt
```
### Configure Environment
1. Create `.env` file in project root:
```env
SECRET_KEY=your-secure-key-here
```
2. Gen …