Skip to content

devrishavjha/heart-disease-prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🩺 AI Heart Doctor

AI Heart Doctor is a user-friendly web application built with Streamlit that leverages machine learning to predict the likelihood of heart disease based on key health metrics. The app provides real-time risk assessments, personalized health recommendations, and intuitive visualizations to help users understand their heart health.

🚀 Live Demo

Experience the app in action: https://doctoraiheart.streamlit.app/

🧠 Features

  • Real-Time Risk Prediction: Input personal health data to receive an immediate heart disease risk assessment.
  • Interactive Visualizations: Utilize a color-coded gauge chart to visualize risk levels.
  • Personalized Health Tips: Receive tailored advice based on your risk category.
  • User-Friendly Interface: Designed with a modern, responsive layout for an optimal user experience.

🧬 Technologies Used

  • Streamlit: For building the interactive web application.
  • Pandas: For data manipulation and analysis.
  • Scikit-learn: For implementing the machine learning model.
  • Plotly: For creating interactive visualizations.
  • Pickle: For loading the pre-trained machine learning model.

📥 Installation & Usage

To run the application locally:

  1. Clone the repository:

    git clone https://github.com/yourusername/heart-disease-prediction.git
    cd heart-disease-prediction
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Run the Streamlit app:

    streamlit run app.py
  4. Open the provided local URL in your browser to interact with the app.

📄 Input Features

Provide the following health metrics to receive a risk prediction:

  • Age: Your age in years.
  • Sex: Gender (Male/Female).
  • Chest Pain Type: Type of chest pain experienced.
  • Resting Blood Pressure: Blood pressure at rest (in mm Hg).
  • Cholesterol: Serum cholesterol level (in mg/dl).
  • Fasting Blood Sugar: Whether fasting blood sugar > 120 mg/dl (Yes/No).
  • Resting Electrocardiographic Results: Resting electrocardiographic results.
  • Maximum Heart Rate Achieved: Maximum heart rate achieved during exercise.
  • Exercise Induced Angina: Presence of exercise-induced angina (Yes/No).
  • Oldpeak: ST depression induced by exercise relative to rest.
  • Slope: Slope of the peak exercise ST segment.

📊 Output

After entering your health data and clicking "Predict ❤️":

  • Risk Gauge: A color-coded gauge chart indicating the percentage risk of heart disease.
  • Risk Category: A classification of your risk as either "High Risk" or "Low Risk".
  • Health Tips: Personalized advice based on your risk category.

🛠️ Model Details

The application utilizes a Logistic Regression model trained on a dataset containing various health metrics. The model's performance is evaluated using accuracy, precision, recall, and F1-score metrics to ensure reliable predictions.

📦 Deployment

The app is deployed on Streamlit Cloud, allowing users to access it directly from their browsers without any installation.

📄 License

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


About

AI Heart Doctor is a Streamlit app that predicts heart disease risk using ML. Enter your health metrics to get an instant color-coded risk gauge, AI doctor advice, and key vitals. Modern UI, interactive charts, and preventive guidance for better heart health.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages