CoolFace
Apppublic

Irannas/Masked_Email_Classification

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
App README

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:

bash
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