Lanka Talent Insights
FastAPI service and dashboard for Sri Lankan hiring and early-attrition risk prediction.
The Space entrypoint runs the FastAPI application in main:app.
API key protection
Set an APP_API_KEY environment variable or Hugging Face Space Secret. When it
is set, send the same value in the X-API-Key header to /predict,
/predict/batch, and /predict/csv. If it is not set, local development mode
remains open.
Deployment note
The code is ready for a Docker Space. Hugging Face currently requires a PRO subscription or a community grant for this account to run Docker/ZeroGPU Spaces, so the public repository currently stores the complete deployable artifacts while runtime hosting is pending account access.
Included
- F1-optimized Logistic Regression model
- Interactive dashboard at
/ - Swagger API documentation at
/docs POST /predictfor one employee risk vectorPOST /predict/batchfor JSON batchesPOST /predict/csvfor CSV scoringGET /api/overviewfor metrics, risk factors, and dataset summary
The model uses these 11 columns: SalaryGapRisk, CompanySwitchRate, LowMatchRisk, LowSimilarityRisk, LowInterviewRisk, NoticeRisk, LocationWorkRisk, TrainingRisk, MentorshipRisk, CareerDevelopmentRisk, and CertificationRisk.