How yedz18/health_predicion works
This repository is a web-based stroke-risk prediction application. A user submits health and demographic fields; the FastAPI handler encodes categorical values, scales the feature row, runs a persisted classifier, and renders a risk message. The tree and sampled app.py support this runtime path, but the README is empty and the template contents were not sampled, so presentation wiring beyond the handler’s template use is not inferred.
Main entry points: app.py FastAPI app · index.html Input form · scaler.pkl Feature scaler · stoke_prediction.pkl Stroke classifier
Components 8
Web presentation
- Input form
Health-Prediction-main/Brain-Stoke-Prediction-main/templates/index.html - Prediction message
Health-Prediction-main/Brain-Stoke-Prediction-main/templates/index.html - Page styles
Health-Prediction-main/Brain-Stoke-Prediction-main/static/style.css
Prediction runtime
- FastAPI app
Health-Prediction-main/Brain-Stoke-Prediction-main/app.py - Feature encoding
Health-Prediction-main/Brain-Stoke-Prediction-main/app.py
Model artifacts
- Feature scaler
Health-Prediction-main/Brain-Stoke-Prediction-main/scaler.pkl - Stroke classifier
Health-Prediction-main/Brain-Stoke-Prediction-main/stoke_prediction.pkl
Other components
- User
Connections 11
- User → Input form: enters health data
- Input form → FastAPI app: submits form
- FastAPI app → Feature encoding: encodes fields
- FastAPI app → Feature scaler: loads at startup
- FastAPI app → Stroke classifier: loads at startup
- FastAPI app → Feature scaler: scales features
- FastAPI app → Stroke classifier: predicts risk
- FastAPI app → Prediction message: renders message
- FastAPI app → Input form: renders page
- User → Prediction message: reads result
- FastAPI app → Page styles: mounts static files