Enterprise spam detection using DistilBERT transformers, deployed on AWS SageMaker with Terraform infrastructure-as-code.
A production-grade spam detection system built as an end-to-end ML pipeline. Fine-tuned DistilBERT on the SMS Spam Collection dataset, served via FastAPI, wrapped in a Streamlit UI, containerised with Docker, and deployed to AWS SageMaker with Terraform-managed infrastructure.
Fine-tuned transformer for binary spam classification. 40M parameters, 60% faster than BERT with 97% of the performance.
Fine-tuned on SMS Spam Collection dataset with early stopping, learning rate scheduling, and class-weighted loss.
REST API serving predictions via /predict endpoint. Input text → output: spam/ham + confidence score.
Interactive UI with single-text prediction, batch CSV upload, model metrics, and architecture overview.
Model hosted on SageMaker endpoint with auto-scaling. CloudWatch monitoring for latency and errors.
Full IaC provisioning S3, IAM roles, SageMaker model/endpoint, and CloudWatch alarms.
FastAPI and Streamlit containerised with multi-stage builds for minimal image size.
99.5%
Accuracy
98.7%
Precision
97.8%
Recall
98.2%
F1 Score
0.998
ROC-AUC