Sexism and Hate Speech Mitigation
Collection
5 items • Updated
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("tum-nlp/bert-counterspeech-classifier")
model = AutoModelForSequenceClassification.from_pretrained("tum-nlp/bert-counterspeech-classifier")The BERT-based counter-speech classifier is finetuned on the CONAN dataset for classifying whether a response is counter-speech, based on the counter-argument classifier ThinkCERCA/counterargument_hugging
The model is intended for classifying LM-generated dialogue responses, evaluating their validity as counter-speech.
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="tum-nlp/bert-counterspeech-classifier")