This project uses an Artificial Neural Network (ANN) to predict whether a patient is likely to have heart disease based on various medical attributes. It includes both a Jupyter Notebook for training and a Streamlit Web App for real-time prediction.
The dataset includes clinical features such as:
- Age
- Gender
- Chest pain type
- Resting blood pressure
- Cholesterol
- Maximum heart rate
- Exercise-induced angina
- ST depression
- And more
Target:
0→ No heart disease1→ Heart disease present
📁 Dataset Source:
Kaggle - Heart Disease Dataset
| Layer Type | Details |
|---|---|
| Input Layer | 13 input features |
| Hidden Layers | Dense layers with ReLU activations |
| Output Layer | 1 neuron with Sigmoid activation |
- Loss Function: Binary Crossentropy
- Optimizer: Adam
- Metrics: Accuracy
- ✅ Training Accuracy: ~98.26%
- ✅ Testing Accuracy: ~84.61%
- 🧪 Slight overfitting observed
- Python
- TensorFlow / Keras
- Streamlit
- Pandas, NumPy
- Matplotlib, Seaborn
- Jupyter Notebook
| File | Description |
|---|---|
Heart_ANN.ipynb |
Notebook: training, evaluation, visualization |
heart_disease_app_py.py |
Streamlit web interface |
heart_ann_model.h5 |
Trained ANN model (Keras H5 format) |
requirements.txt |
Project dependencies |
# Clone the repository
git clone https://github.com/codesbysuraj/heart-disease-detect-ann.git
cd heart-disease-detect-ann
# Install dependencies
pip install -r requirements.txt
# Launch the Streamlit app
streamlit run heart_disease_app_py.pySuraj Yadav
- GitHub: @codesbysuraj
- Email: surajy.tech@gmail.com