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