Downloads · 30 days
0
mr-baraiya/cardio-disease-model
cardio-disease-model is a machine learning model from mr-baraiya. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
A machine learning–powered Cardio Disease Prediction system using Random Forest and Logistic Regression, deployed with FastAPI and hosted on Hugging Face + Render.
Downloads · 30 days
0
Access
Public
Updated Jan 6, 2026
Repo size
212 MB
Likes
1
Public
Click a slice to open those files.
.pkl212 MB · 100%
From the Hugging Face model README
A machine learning–powered Cardio Disease Prediction system using Random Forest and Logistic Regression, deployed with FastAPI and hosted on Hugging Face + Render.
This project predicts the risk of cardiovascular disease based on patient health parameters and provides both probability scores and risk classification.
Base URL: https://cardio-fastapi-8ijy.onrender.com
Swagger UI: https://cardio-fastapi-8ijy.onrender.com/docs
Both models are trained on a cleaned cardiovascular dataset.
cardio-disease-model/
│
├── random_forest_model.pkl # Trained Random Forest model
├── logistic_weights.npy # Logistic regression weights
├── logistic_bias.npy # Logistic regression bias
├── scaler_num.pkl # Numerical feature scaler
├── scaler_int.pkl # Categorical feature scaler
└── README.md
| Feature | Description |
|---|---|
| age | Age in years |
| gender | 1 = Male, 0 = Female |
| height | Height (cm) |
| weight | Weight (kg) |
| ap_hi | Systolic blood pressure |
| ap_lo | Diastolic blood pressure |
| cholesterol | 1=Normal, 2=Above Normal, 3=High |
| gluc | 1=Normal, 2=Above Normal, 3=High |
| smoke | 1=Smoker, 0=Non-smoker |
| alco | 1=Alcohol intake, 0=No |
| active | 1=Physically active, 0=Inactive |
GET /health
POST /predict/randomforest
POST /predict/logistic
POST /predict/compare
{
"age": 55,
"gender": 1,
"height": 170,
"weight": 72,
"ap_hi": 130,
"ap_lo": 85,
"cholesterol": 1,
"gluc": 1,
"smoke": 0,
"alco": 0,
"active": 1
}
{
"model": "Random Forest",
"prediction": 0,
"probability": 0.15,
"risk": "Low Risk"
}
This project is for educational and research purposes only. It must not be used as a substitute for professional medical diagnosis.
This project is licensed under the MIT License.
Vishal Baraiya B.Tech CSE | Machine Learning & Full Stack Developer
⭐ If you find this project useful, please consider starring the repository!