CoolFace
Apppublic

Irannas/Masked_Email_Classification

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
README.md73 linesDownload Raw Back to root
1---2title: Email Classifier Project3emoji: ๐Ÿ“‰4colorFrom: blue5colorTo: purple6sdk: docker7pinned: false8---9 10Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference11# ๐Ÿ“ง Email Classifier with PII Masking12 13An intelligent tool that classifies emails into categories like Work, Personal, Spam, etc., while protecting sensitive information through PII (Personally Identifiable Information) masking.14 15**๐Ÿ”— Live Demo:** [๐ŸŒ Try it on Hugging Face Spaces](https://huggingface.co/spaces/Irannas/Masked_Email_Classification)  16**๐Ÿ“ GitHub Repo:** [GitHub Repository](https://github.com/IrannaSS/Masked_Email_Classification)17 18---19 20## ๐Ÿš€ Features21 22- ๐Ÿ” **PII Masking**: Automatically detects and masks sensitive information such as names, phone numbers, email addresses, and more.23- ๐Ÿง  **Email Classification**: Uses a fine-tuned transformer model to classify email content into predefined categories.24- โšก **Real-Time Inference**: Deployed with Streamlit for fast and user-friendly web interaction.25- ๐Ÿ“‚ **Batch Upload Support**: Upload multiple email files (TXT format) and process them in one go.26 27---28 29## ๐Ÿงฐ Tech Stack30 31- **Language:** Python 3.10+32- **NLP Libraries:** Transformers (Hugging Face), spaCy, scikit-learn33- **Model:** DistilBERT / Custom Transformer34- **Deployment:** Streamlit, Hugging Face Spaces35- **PII Detection:** Regex + spaCy NER36 37---38 39## ๐Ÿ“ Project Structure40 41Email_Classifier_Project/42โ”œโ”€โ”€ app/                      # Streamlit App43โ”‚   โ””โ”€โ”€ app.py44โ”œโ”€โ”€ model/                    # Trained model and tokenizer45โ”‚   โ””โ”€โ”€ classifier_model/46โ”œโ”€โ”€ data/                     # Sample email data47โ”‚   โ””โ”€โ”€ sample_emails/48โ”œโ”€โ”€ utils/                    # Helper functions (PII masking, preprocessing, etc.)49โ”‚   โ””โ”€โ”€ preprocess.py50โ”œโ”€โ”€ requirements.txt51โ”œโ”€โ”€ Dockerfile               52โ””โ”€โ”€ README.md53 54 55 56---57 58## โš™๏ธ Installation59 60Clone the repository and install the requirements:61 62```bash63git clone https://github.com/IrannaSS/Masked_Email_Classification64cd your-repo-name65pip install -r requirements.txt66 67 68Run the Streamlit app locally:69 70        streamlit run app/app.py71 72 73