An open API service indexing awesome lists of open source software.

https://github.com/radha1805/symptom-checker-ml

Symptom Checker ML Model β€” includes data preprocessing, feature engineering, training pipeline, prediction API (FastAPI), multilingual support, and Docker deployment.
https://github.com/radha1805/symptom-checker-ml

ai docker fastapi healthcare machine-learning ml-model multilingual nlp python symptom-checker telemedicine

Last synced: 2 months ago
JSON representation

Symptom Checker ML Model β€” includes data preprocessing, feature engineering, training pipeline, prediction API (FastAPI), multilingual support, and Docker deployment.

Awesome Lists containing this project

README

          


Python Version
FastAPI
Machine Learning
License
Last Commit
Repo Size

# Symptom Checker ML Model

An AI-based symptom checker designed with a complete ML training pipeline, multilingual support, and a deployment-ready FastAPI backend.

## πŸ“Œ Overview

This project implements a machine learning model that predicts possible diseases based on user-provided symptoms.
It includes preprocessing, feature engineering, model training, inferencing APIs, multilingual handling, and Docker-based deployment.
The architecture is clean, modular, and suitable for real-world telemedicine workflows.

---

## πŸš€ Features

- **Machine Learning Model** for symptom-based disease prediction
- **Training Pipeline** with preprocessing, feature engineering, and evaluation
- **Prediction API (FastAPI)** exposing inference endpoints
- **Multilingual Support** (English, Hindi, Punjabi)
- **Speech-to-Text & Text-to-Speech Support** (local + cloud options)
- **Docker Deployment** for easy containerization
- **Clean Modular Architecture** for scalability

---

## πŸ“ Project Structure

```
symptoms_checker/
β”‚
β”œβ”€β”€ api.py # FastAPI prediction server
β”œβ”€β”€ train_model.py # Model training script
β”œβ”€β”€ feature_engineer.py # Feature extraction & preprocessing
β”œβ”€β”€ symptom_extractor.py # Extracts symptom keywords
β”œβ”€β”€ translator.py # Multilingual translation logic
β”œβ”€β”€ stt_tts.py # Speech-to-text and text-to-speech
β”‚
β”œβ”€β”€ artifacts/ # Saved ML models and encoders
β”œβ”€β”€ tests/ # Test suite
β”‚
β”œβ”€β”€ requirements.txt # Dependencies
β”œβ”€β”€ Dockerfile # Deployment configuration
└── README.md # Documentation
```

---

## πŸ”§ Installation

### 1. Clone the repository
```
git clone https://github.com/yourusername/symptom-checker-ml.git
cd symptom-checker-ml
```

### 2. Install dependencies
```
pip install -r requirements.txt
```

---

## ▢️ Running the Model API

Start the FastAPI inference server:
```
uvicorn api:app --host 0.0.0.0 --port 8000
```

Open in browser:
**http://localhost:8000/docs**

---

## πŸ“‘ Example API Usage

### POST `/predict`

**Input**
```json
{
"text": "I have fever and body pain"
}
```

**Output**
```json
{
"predicted_disease": "Influenza"
}
```

---

## 🧠 Model

The model uses classical ML techniques trained on symptom–disease mappings.
Pipeline includes:

- Text preprocessing
- Symptom feature extraction
- One-hot encodings
- Model training
- Artifact saving

Artifacts are stored in the `/artifacts` directory.

---

## 🌍 Multilingual Support

Supported languages:
- English
- Hindi
- Punjabi

Inputs are normalized internally before prediction.

---

## 🐳 Docker Deployment

Build image:
```
docker build -t symptom-checker .
```

Run container:
```
docker run -p 8000:8000 symptom-checker
```

---

## πŸ§ͺ Testing

Run the test suite:
```
pytest
```

---

## πŸ‘©β€πŸ’» Author

**Radha Sarda**
Machine Learning | AI | Deployment
Open to collaborations and improvements.

---

## πŸ“œ License

Released under the MIT License.