Update README.md
Browse files
README.md
CHANGED
|
@@ -1,11 +1,77 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
tags: [microaggression, deberta]
|
| 5 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
---
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
|
|
|
| 4 |
license: apache-2.0
|
| 5 |
+
tags:
|
| 6 |
+
- deberta
|
| 7 |
+
- text-classification
|
| 8 |
+
- microaggression
|
| 9 |
+
- detection
|
| 10 |
+
- bias
|
| 11 |
+
pipeline_tag: text-classification
|
| 12 |
+
widget:
|
| 13 |
+
- text: "You speak good English for someone from there."
|
| 14 |
+
- text: "Where are you really from?"
|
| 15 |
+
- text: "You're so articulate."
|
| 16 |
+
datasets:
|
| 17 |
+
- custom
|
| 18 |
+
metrics:
|
| 19 |
+
- accuracy
|
| 20 |
+
- f1
|
| 21 |
+
model-index:
|
| 22 |
+
- name: CI_MA_Detect
|
| 23 |
+
results:
|
| 24 |
+
- task:
|
| 25 |
+
type: text-classification
|
| 26 |
+
name: Microaggression Detection
|
| 27 |
+
metrics:
|
| 28 |
+
- type: accuracy
|
| 29 |
+
value: 0.85
|
| 30 |
+
name: Accuracy
|
| 31 |
---
|
| 32 |
|
| 33 |
+
# CI_MA_Detect - Microaggression Detection Model
|
| 34 |
+
|
| 35 |
+
This model detects microaggressions in text using a fine-tuned DeBERTa architecture.
|
| 36 |
+
|
| 37 |
+
## Model Description
|
| 38 |
+
|
| 39 |
+
- **Model type:** DeBERTa for sequence classification
|
| 40 |
+
- **Task:** Binary text classification (microaggression detection)
|
| 41 |
+
- **Labels:**
|
| 42 |
+
- LABEL_0: Not a microaggression
|
| 43 |
+
- LABEL_1: Microaggression detected
|
| 44 |
+
|
| 45 |
+
## Usage
|
| 46 |
+
|
| 47 |
+
```python
|
| 48 |
+
from transformers import DebertaTokenizer, DebertaForSequenceClassification
|
| 49 |
+
import torch
|
| 50 |
+
|
| 51 |
+
tokenizer = DebertaTokenizer.from_pretrained("jokugeorgin/CI_MA_Detect")
|
| 52 |
+
model = DebertaForSequenceClassification.from_pretrained("jokugeorgin/CI_MA_Detect")
|
| 53 |
+
|
| 54 |
+
text = "You speak good English for someone from there."
|
| 55 |
+
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=128)
|
| 56 |
+
outputs = model(**inputs)
|
| 57 |
+
prediction = torch.argmax(outputs.logits, dim=1)
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
## API Usage
|
| 61 |
+
|
| 62 |
+
```bash
|
| 63 |
+
curl https://api-inference.huggingface.co/models/jokugeorgin/CI_MA_Detect \
|
| 64 |
+
-H "Authorization: Bearer YOUR_HF_TOKEN" \
|
| 65 |
+
-H "Content-Type: application/json" \
|
| 66 |
+
-d '{"inputs": "You speak good English for someone from there."}'
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
## Training Data
|
| 70 |
+
|
| 71 |
+
Custom dataset of microaggression examples and neutral text.
|
| 72 |
+
|
| 73 |
+
## Limitations
|
| 74 |
|
| 75 |
+
- Works best with English text
|
| 76 |
+
- May require context for ambiguous statements
|
| 77 |
+
- Performance varies with text length and complexity
|