Skip to content

This project classifies emails into 4 categories — Incident, Request, Problem, or Change — while protecting privacy by masking PII (Personally Identifiable Information) like names, emails, and phone numbers.

Notifications You must be signed in to change notification settings

Abhishek17-10/Email-classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Email Classification with PII Masking

This project classifies emails into 4 categories — Incident, Request, Problem, or Change — while protecting privacy by masking PII (Personally Identifiable Information) like names, emails, and phone numbers.

Live Demo 👉 Try it on Hugging Face Spaces 🚀


✨ Features

  • ✅ Classifies emails using a DistilBERT model
  • ✅ PII Masking using SpaCy (en_core_web_sm)
  • ✅ Clean and responsive Gradio UI
  • ✅ Hosted for free on Hugging Face Spaces
  • ✅ Simple to run locally

🧠 Model Training Info

  • ✅ Base Model: distilbert-base-uncased
  • ✅ Fine-tuned on labeled email data
  • ✅ Categories: Incident, Request, Problem, Change
  • ✅ Class weights handled to reduce bias
  • ✅ Trained using transformers.Trainer

🛠️ Tech Stack

Component Description
🧠 Model DistilBERT fine-tuned for classification
🧹 PII Masking SpaCy with regex + NER
🌐 Frontend Gradio for simple web UI
☁️ Deployment Hugging Face Spaces

🧪 How to Run Locally

git clone https://github.com/Abhishek17-10/Email-classification.git
cd Email-classification
pip install -r requirements.txt
python app.py

About

This project classifies emails into 4 categories — Incident, Request, Problem, or Change — while protecting privacy by masking PII (Personally Identifiable Information) like names, emails, and phone numbers.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages