Create README.md
Browse filesπ Production-Ready
This model works out of the box with:
β
FastAPI backends
β
Hugging Face pipeline
β
Gradio / Streamlit frontends
β
Real-time inference on CPU/GPU
Let me know if you'd like help with a live demo or deployment script.
π€ Let's Connect
Crafted with care by <span style="color:#48b2f7; font-weight:600;">Raghavendra</span> π οΈ
If this model helps your project, please β it, give feedback, or open issues!
Fork it to adapt it for your domain β or reach out if you want help creating one.
README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
metrics:
|
| 6 |
+
- accuracy
|
| 7 |
+
- f1
|
| 8 |
+
- precision
|
| 9 |
+
- recall
|
| 10 |
+
base_model: FacebookAI/roberta-base
|
| 11 |
+
pipeline_tag: text-classification
|
| 12 |
+
library_name: transformers
|
| 13 |
+
tags:
|
| 14 |
+
- roberta
|
| 15 |
+
- toxicity-detection
|
| 16 |
+
- transformers
|
| 17 |
+
- text-classification
|
| 18 |
+
- custom-dataset
|
| 19 |
+
eval_results:
|
| 20 |
+
eval_accuracy: 0.94
|
| 21 |
+
eval_f1: 0.93
|
| 22 |
+
eval_precision: 0.95
|
| 23 |
+
eval_recall: 0.91
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
# π‘οΈ Toxicity-RoBERTa-Base
|
| 27 |
+
|
| 28 |
+
A fine-tuned transformer model built on top of [`roberta-base`](https://huggingface.co/roberta-base) to **detect toxic content** in text β including insults, threats, hate speech, and offensive language.
|
| 29 |
+
The model is lightweight, accurate, and ideal for **real-time moderation** tasks.
|
| 30 |
+
|
| 31 |
+
---
|
| 32 |
+
|
| 33 |
+
## π§© Use Cases
|
| 34 |
+
|
| 35 |
+
This model is designed to flag toxic messages in:
|
| 36 |
+
|
| 37 |
+
- π§΅ Social media comments and posts
|
| 38 |
+
- π οΈ Developer forums and Discord/Slack bots
|
| 39 |
+
- π§ LLM output moderation
|
| 40 |
+
- π§© Community Q&A sites (like Reddit, Stack Overflow)
|
| 41 |
+
- π¨ User-generated content platforms (blogs, review sites, games)
|
| 42 |
+
|
| 43 |
+
---
|
| 44 |
+
|
| 45 |
+
## π Model Summary
|
| 46 |
+
|
| 47 |
+
| Attribute | Details |
|
| 48 |
+
|----------------------|-------------------------------------|
|
| 49 |
+
| Base Architecture | `roberta-base` |
|
| 50 |
+
| Fine-tuned For | Toxic vs. Non-toxic classification |
|
| 51 |
+
| Classes | `0 = Non-toxic`, `1 = Toxic` |
|
| 52 |
+
| Language | English (`en`) |
|
| 53 |
+
| Data Sources | Custom dataset (multi-domain) |
|
| 54 |
+
| Framework | π€ Transformers |
|
| 55 |
+
| Total Parameters | ~125M |
|
| 56 |
+
|
| 57 |
+
---
|
| 58 |
+
|
| 59 |
+
## π Performance
|
| 60 |
+
|
| 61 |
+
| Metric | Result |
|
| 62 |
+
|--------------|--------|
|
| 63 |
+
| Accuracy | 94% |
|
| 64 |
+
| F1 Score | 93% |
|
| 65 |
+
| Precision | 95% |
|
| 66 |
+
| Recall | 91% |
|
| 67 |
+
|
| 68 |
+
---
|
| 69 |
+
|
| 70 |
+
## βοΈ Quick Start
|
| 71 |
+
|
| 72 |
+
### π‘ Install Required Libraries
|
| 73 |
+
|
| 74 |
+
```bash
|
| 75 |
+
pip install transformers torch
|