Skip to content

codeByShan/HeartStrokeRepository

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🫀 Heart Stroke Prediction App

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.

🚀 Live Demo

Click here to view the app : https://heart-stroke-predictions.streamlit.app/

📌 About the Project

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.

🧠 Features

  • 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

📊 Input Features

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

🛠️ Tech Stack

  • Python -> Programming Language
  • Scikit-learn —> ML model training
  • Pandas & NumPy —> Data processing
  • Streamlit —> Web application framework

⚙️ How to Run Locally

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

📁 Project Structure

heart-stroke-prediction/

├── app.py # Main Streamlit application

├── model.pkl # Trained ML model

├── requirements.txt # Python dependencies

└── README.md # Project documentation

👨‍💻 Author

Zeeshan Ali — @codeByShan

📄 License

This project is open source and available under the MIT License.

About

A machine learning web application that predicts the risk of heart disease/stroke based on clinical parameters including age, cholesterol, blood pressure, ECG results, and exercise-related indicators.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages