thefrankhsu/hate_speech_twitter
Viewer • Updated • 6.68k • 131 • 5
How to use marielalvs/hatespeech-bert with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="marielalvs/hatespeech-bert") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("marielalvs/hatespeech-bert")
model = AutoModelForSequenceClassification.from_pretrained("marielalvs/hatespeech-bert")# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("marielalvs/hatespeech-bert")
model = AutoModelForSequenceClassification.from_pretrained("marielalvs/hatespeech-bert")Base model
google-bert/bert-base-uncased
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="marielalvs/hatespeech-bert")