How tanishq-latent/credit-risk-assesment-using-shap works
This is a browser-based credit-risk assessment service. A user enters loan and borrower details, the browser submits them to FastAPI, and the service scores the application with a preloaded model, applies a stored threshold, and returns a risk verdict for display. The tree also includes a training notebook and dataset, but their contents were not sampled, so their role and connections are not assumed.
Main entry points: main.py FastAPI service · script.js Form and results · index.html Application form · credit_risk_model.pkl Trained model
Components 11
Web interface
- Application form
static/index.html - Form and results
static/script.js - Interface styling
static/style.css
Risk service
- FastAPI service
main.py - Loan input schema
main.py - Risk scoring
main.py
Model artifacts
- Trained model
credit_risk_model.pkl - Decision threshold
best_threshold.pkl - Training notebook
Credit_Risk.ipynb - Credit dataset
credit_risk_dataset.csv
Other components
- Applicant
Connections 13
- Applicant → Application form: enters details
- Application form → Form and results: provides form
- Form and results → FastAPI service: POST /predict
- FastAPI service → Loan input schema: validates with
- FastAPI service → Risk scoring: calls
- Risk scoring → Trained model: scores with
- Risk scoring → Decision threshold: compares against
- FastAPI service → Form and results: returns verdict
- Form and results → Applicant: displays result
- FastAPI service → Trained model: loads at startup
- FastAPI service → Decision threshold: loads at startup
- FastAPI service → Application form: serves static files
- Form and results → Interface styling: uses styles