This project predicts the risk of heart disease based on various health parameters using machine learning.
- Interactive web app built with Streamlit
- Machine learning model trained on heart disease dataset
- Real-time prediction with probability scores
Heart_Risk.ipynb: Jupyter notebook with data analysis, model training, and evaluationapp.py: Streamlit web application for predictionsheart.csv: Dataset used for trainingmodel.pkl: Trained machine learning model
-
Clone the repository:
git clone https://github.com/Khushii-04/Heart_Risk_predictor.git cd Heart_Risk_predictor -
Install dependencies:
pip install streamlit pandas scikit-learn
To run the Streamlit web application:
streamlit run app.pyThis will start the app on http://localhost:8501. Open this URL in your browser to use the heart disease risk predictor.
To explore the data analysis and model training:
- Open
Heart_Risk.ipynbin Jupyter Notebook or VS Code - Run the cells to see the analysis and train the model
The model is a Random Forest classifier trained on features like age, cholesterol, blood pressure, etc. It predicts the probability of heart disease risk.