Skip to content

A multi-disease prediction system built with Streamlit and trained ML models to detect Diabetes, Heart Disease, and Parkinson's Disease based on user health data. Deployed on Heroku.

Notifications You must be signed in to change notification settings

therealvinayak/multiple-disease-prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Multiple Disease Prediction Web App

A multi-disease prediction system built using Streamlit and Machine Learning models to detect:

  • 🩸 Diabetes
  • ❀️ Heart Disease
  • 🧠 Parkinson's Disease

πŸ”— Live App: https://multiple-disease-prediction-test-therealvinayak.streamlit.app/

πŸš€ Features

  • πŸ§ͺ Predict the likelihood of three major diseases based on health parameters
  • πŸ’‘ Powered by trained ML classification models
  • πŸ“Š Clean, interactive Streamlit UI
  • πŸ“± Mobile-friendly and responsive layout
  • ⚑ Real-time predictions with instant results
  • 🎯 High accuracy models trained on validated datasets

πŸ“¦ Tech Stack

  • Frontend/UI: Streamlit
  • Backend: Scikit-learn, Pandas, NumPy
  • Deployment: Streamlit Cloud
  • ML Models: Logistic Regression, SVM, Random Forest (per disease)
  • Data Processing: Pandas, NumPy
  • Model Serialization: Pickle

πŸ–₯️ App Screenshots

image image image

πŸ› οΈ Installation (Local)

Prerequisites

  • Python 3.8 or higher
  • pip package manager

Setup Instructions

  1. Clone the repository
git clone https://github.com/therealvinayak/multiple-disease-prediction.git
cd multiple-disease-prediction
  1. Create virtual environment (recommended)
# Create virtual environment
python -m venv venv

# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
  1. Install dependencies
pip install -r requirements.txt
  1. Run the app
streamlit run app.py
  1. Access the app
    • Open your browser and go to http://localhost:8501

πŸ“ Usage

  1. Select Disease Type: Choose from Diabetes, Heart Disease, or Parkinson's Disease using the sidebar
  2. Input Health Parameters: Enter the required health metrics and symptoms
  3. Get Prediction: Click the predict button to get instant results
  4. View Results: See the prediction probability and risk assessment

Input Parameters by Disease:

Diabetes Prediction:

  • Glucose level, Blood pressure, BMI, Age, etc.

Heart Disease Prediction:

  • Chest pain type, Cholesterol, Maximum heart rate, etc.

Parkinson's Disease Prediction:

  • Voice measurements, Tremor indicators, Motor symptoms, etc.

βš™οΈ Deployment

Streamlit Cloud Deployment

  1. Push to GitHub: Ensure your code is pushed to a GitHub repository
  2. Connect to Streamlit Cloud:
  3. Configure Deployment:
    • Set app.py as the main entry point
    • Add any required secrets/environment variables
  4. Deploy: Click deploy and your app will be live!

Local Deployment with Docker (Optional)

# Build Docker image
docker build -t disease-prediction-app .

# Run container
docker run -p 8501:8501 disease-prediction-app

πŸ“ Project Structure

multiple-disease-prediction/
β”œβ”€β”€ app.py                      # Main Streamlit application
β”œβ”€β”€ models/                     # Trained ML models
β”‚   β”œβ”€β”€ diabetes_model.pkl
β”‚   β”œβ”€β”€ heart_disease_model.pkl
β”‚   └── parkinsons_model.pkl
β”œβ”€β”€ data/                       # Dataset files (if included)
β”œβ”€β”€ notebooks/                  # Jupyter notebooks for model training
β”œβ”€β”€ utils/                      # Utility functions
β”œβ”€β”€ requirements.txt            # Python dependencies
β”œβ”€β”€ .streamlit/
β”‚   β”œβ”€β”€ config.toml            # Streamlit configuration
β”‚   └── secrets.toml           # Secret keys (not in repo)
β”œβ”€β”€ screenshots/               # App screenshots
β”œβ”€β”€ Dockerfile                 # Docker configuration (optional)
β”œβ”€β”€ .gitignore                 # Git ignore file
β”œβ”€β”€ LICENSE                    # License file
└── README.md                  # This file

🧠 Models & Data

Machine Learning Models

  • Diabetes Model: Trained on Pima Indian Diabetes Dataset
  • Heart Disease Model: Trained on Cleveland Heart Disease Dataset
  • Parkinson's Model: Trained on UCI Parkinson's Dataset

Model Performance

Disease Algorithm Accuracy Precision Recall F1-Score
Diabetes Logistic Regression 85% 0.83 0.87 0.85
Heart Disease Random Forest 88% 0.86 0.89 0.87
Parkinson's SVM 92% 0.91 0.93 0.92

Data Sources

🀝 Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Areas for Contribution:

  • Adding new disease prediction models
  • Improving model accuracy
  • Enhancing UI/UX
  • Adding data visualizations
  • Writing tests
  • Improving documentation

πŸ“Š Future Enhancements

  • Add more disease prediction models
  • Implement deep learning models
  • Add data visualization charts
  • Create REST API endpoints
  • Add user authentication
  • Implement prediction history
  • Add model explainability features
  • Mobile app version

⚠️ Disclaimer

This application is for educational and informational purposes only. It should not be used as a substitute for professional medical advice, diagnosis, or treatment. Always consult with qualified healthcare professionals for medical concerns.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

✍️ Author

Vinayak

πŸ™ Acknowledgments

  • UCI Machine Learning Repository for datasets
  • Streamlit team for the amazing framework
  • Scikit-learn contributors
  • Open source community

⭐ If you found this project helpful, please consider giving it a star! ⭐

About

A multi-disease prediction system built with Streamlit and trained ML models to detect Diabetes, Heart Disease, and Parkinson's Disease based on user health data. Deployed on Heroku.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published