Instructions to use Andrazp/multilingual-hate-speech-robacofi with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Andrazp/multilingual-hate-speech-robacofi with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Andrazp/multilingual-hate-speech-robacofi")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Andrazp/multilingual-hate-speech-robacofi") model = AutoModelForSequenceClassification.from_pretrained("Andrazp/multilingual-hate-speech-robacofi", device_map="auto") - Notebooks
- Google Colab
- Kaggle
adding label names
Browse files- config.json +4 -4
config.json
CHANGED
|
@@ -3,10 +3,10 @@
|
|
| 3 |
"architectures": [
|
| 4 |
"XLMRobertaForSequenceClassification"
|
| 5 |
],
|
| 6 |
-
"id2label":
|
| 7 |
-
"not offensive",
|
| 8 |
-
"offensive"
|
| 9 |
-
|
| 10 |
"attention_probs_dropout_prob": 0.1,
|
| 11 |
"bos_token_id": 0,
|
| 12 |
"classifier_dropout": null,
|
|
|
|
| 3 |
"architectures": [
|
| 4 |
"XLMRobertaForSequenceClassification"
|
| 5 |
],
|
| 6 |
+
"id2label": {
|
| 7 |
+
"0": "not offensive",
|
| 8 |
+
"1": "offensive"
|
| 9 |
+
},
|
| 10 |
"attention_probs_dropout_prob": 0.1,
|
| 11 |
"bos_token_id": 0,
|
| 12 |
"classifier_dropout": null,
|