CardioGuard AI is a state-of-the-art heart disease prediction system powered by machine learning. It utilizes a Random Forest Classifier to analyze patient biometric data and provide a real-time risk assessment. The application features a futuristic, "Ultra Premium" user interface designed for clarity, engagement, and professional medical aesthetics.
- 🤖 Advanced ML Engine: Powered by a robust Random Forest Classifier trained on clinical heart disease data.
- 🎨 Futuristic UI/UX: Immersive interface with animated backgrounds, particle effects, and glassmorphism design.
- 📊 Interactive Biometrics: Easy-to-use sliders and dropdowns for inputting patient data (Age, BP, Cholesterol, etc.).
- ⚡ Real-time Analysis: Instant risk probability calculation with visual feedback.
- 📈 Dynamic Visualizations:
- Animated gauge charts for risk scoring.
- Key health metrics dashboard.
- Lottie animations for visual engagement.
- 🔄 Auto-Healing: Automatically retrains the model if the model file is missing or incompatible.
- Frontend: Streamlit
- Machine Learning: Scikit-learn
- Data Processing: Pandas
- Visualization: Plotly, Streamlit-Lottie
- Model Serialization: Joblib
├── app.py # Main Streamlit application
├── train_model.py # Model training script
├── heart.csv # Dataset for training
├── model.joblib # Trained Random Forest model
├── healthy_profile.joblib # Reference profile for default values
├── requirements.txt # Python dependencies
└── README.md # Project documentation
-
Clone the repository (or download the files):
git clone <repository-url> cd heart-disease-prediction
-
Create a virtual environment (optional but recommended):
python -m venv venv # Windows venv\Scripts\activate # macOS/Linux source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Train the Model (First Run): If
model.joblibis missing, the app will attempt to train it automatically. You can also manually train it:python train_model.py
-
Run the application:
streamlit run app.py
-
Navigate the Interface:
- Enter patient details in the Biometric Input section.
- Adjust sliders for numerical values (Age, Blood Pressure, etc.).
- Select options for categorical values (Chest Pain Type, ECG results, etc.).
-
Analyze:
- Click the ⚡ INITIATE ANALYSIS button.
- View the Risk Probability gauge and detailed recommendation card.
CardioGuard AI is a demonstration tool for educational and research purposes only.
- It is NOT a substitute for professional medical advice, diagnosis, or treatment.
- Always seek the advice of your physician or other qualified health provider with any questions you may have regarding a medical condition.
- Do not disregard professional medical advice or delay in seeking it because of something you have read on this application.
© 2025 CardioGuard AI | Neural Diagnostic System