Instructions to use tum-nlp/bert-hateXplain with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tum-nlp/bert-hateXplain with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="tum-nlp/bert-hateXplain")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("tum-nlp/bert-hateXplain") model = AutoModelForSequenceClassification.from_pretrained("tum-nlp/bert-hateXplain") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -28,6 +28,6 @@ model = AutoModelForSequenceClassification.from_pretrained('tum-nlp/bert-hateXpl
|
|
| 28 |
hate_classifier = pipeline("text-classification", model=model, tokenizer=tokenizer)
|
| 29 |
|
| 30 |
# Predict
|
| 31 |
-
hate_classifier("
|
| 32 |
|
| 33 |
```
|
|
|
|
| 28 |
hate_classifier = pipeline("text-classification", model=model, tokenizer=tokenizer)
|
| 29 |
|
| 30 |
# Predict
|
| 31 |
+
hate_classifier("I like you. I love you")
|
| 32 |
|
| 33 |
```
|