A machine learning web application that predicts the risk of heart disease based on clinical parameters including ECG results, cholesterol levels, blood pressure, and exercise-related indicators.
Click here to view the app : https://heart-stroke-predictions.streamlit.app/
Heart disease is one of the leading causes of death worldwide. Early detection can save lives. This project uses a trained machine learning classifier to predict whether a patient is at risk of heart disease based on their clinical data — all through a simple, interactive web interface.
- Interactive web interface built with Streamlit
- Trained on a real-world heart disease dataset
- Instant prediction with a single click
- Clean and user-friendly UI
| Feature | Description |
|---|---|
| Age | Age of the patient |
| Sex | Male or Female |
| Chest Pain Type | ASY, ATA, NAP, or TA |
| Resting BP | Resting blood pressure (mm Hg) |
| Cholesterol | Serum cholesterol level (mg/dL) |
| Fasting Blood Sugar | Whether fasting blood sugar > 120 mg/dL |
| Resting ECG | Normal, ST abnormality, or LVH |
| Max Heart Rate | Maximum heart rate achieved |
| Exercise Angina | Chest pain induced by exercise (Yes/No) |
| Oldpeak | ST depression induced by exercise |
| ST Slope | Slope of the peak exercise ST segment |
- Python -> Programming Language
- Scikit-learn —> ML model training
- Pandas & NumPy —> Data processing
- Streamlit —> Web application framework
Clone the repository
bash git clone https://github.com/codeByShan/heart-stroke-prediction.git
cd heart-stroke-prediction
cd heart-stroke-prediction
Install dependencies
bash pip install -r requirements.txt
Run the app
bash streamlit run app.py
heart-stroke-prediction/
├── app.py # Main Streamlit application
├── model.pkl # Trained ML model
├── requirements.txt # Python dependencies
└── README.md # Project documentation
Zeeshan Ali — @codeByShan
This project is open source and available under the MIT License.