| --- |
| title: Toxic Comment Classifier |
| emoji: 🛡️ |
| colorFrom: gray |
| colorTo: red |
| sdk: gradio |
| sdk_version: 6.14.0 |
| app_file: app.py |
| pinned: true |
| license: mit |
| --- |
| |
| # 🛡️ Toxic Comment Classifier |
|
|
| **NLP Final Project** — Fine-tuned DistilBERT on the Jigsaw Toxic Comment Classification Dataset. |
|
|
| ## What it does |
| Classifies English text comments into **6 toxicity categories**: |
| - ☠️ Toxic |
| - 💀 Severe Toxic |
| - 🤬 Obscene |
| - ⚔️ Threat |
| - 😤 Insult |
| - 🎯 Identity Hate |
|
|
| ## Model |
| - **Base**: `distilbert-base-uncased` |
| - **Training data**: ~160K comments from the [Jigsaw dataset](https://www.kaggle.com/c/jigsaw-toxic-comment-classification-challenge) |
| - **Fine-tuning**: Multi-label classification with BCEWithLogitsLoss |
| - **Target F1**: > 85% micro-average |
|
|
| ## How to use |
| 1. Type or paste any English comment in the text box |
| 2. Click **Analyze** |
| 3. See scores per toxicity category + overall verdict |
|
|
| ## Tech Stack |
| `transformers` · `PyTorch` · `Gradio` · `HuggingFace Hub` |