Irannas/Masked_Email_Classification
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
๐ง Email Classifier with PII Masking
An intelligent tool that classifies emails into categories like Work, Personal, Spam, etc., while protecting sensitive information through PII (Personally Identifiable Information) masking.
๐ Live Demo: ๐ Try it on Hugging Face Spaces ๐ GitHub Repo: GitHub Repository
๐ Features
- ๐ PII Masking: Automatically detects and masks sensitive information such as names, phone numbers, email addresses, and more.
- ๐ง Email Classification: Uses a fine-tuned transformer model to classify email content into predefined categories.
- โก Real-Time Inference: Deployed with Streamlit for fast and user-friendly web interaction.
- ๐ Batch Upload Support: Upload multiple email files (TXT format) and process them in one go.
๐งฐ Tech Stack
- Language: Python 3.10+
- NLP Libraries: Transformers (Hugging Face), spaCy, scikit-learn
- Model: DistilBERT / Custom Transformer
- Deployment: Streamlit, Hugging Face Spaces
- PII Detection: Regex + spaCy NER
๐ Project Structure
EmailClassifierProject/ โโโ app/ # Streamlit App โ โโโ app.py โโโ model/ # Trained model and tokenizer โ โโโ classifiermodel/ โโโ data/ # Sample email data โ โโโ sampleemails/ โโโ utils/ # Helper functions (PII masking, preprocessing, etc.) โ โโโ preprocess.py โโโ requirements.txt โโโ Dockerfile โโโ README.md
โ๏ธ Installation
Clone the repository and install the requirements:
git clone https://github.com/IrannaSS/Masked_Email_Classification
cd your-repo-name
pip install -r requirements.txt
Run the Streamlit app locally:
streamlit run app/app.py
