cardiffnlp/tweet_eval
Viewer • Updated • 201k • 37.5k • 143
How to use wesleyacheng/twitter-emotion-classification-with-bert with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="wesleyacheng/twitter-emotion-classification-with-bert") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("wesleyacheng/twitter-emotion-classification-with-bert")
model = AutoModelForSequenceClassification.from_pretrained("wesleyacheng/twitter-emotion-classification-with-bert")First posted in my Kaggle.
Hello, I'm Wesley, nice to meet you! 👋
While I was making my Angry Birds Classifier to classify if tweets are angry or not, I thought why don't we add 2 more emotions! Joy and Sadness into the mix!
Here I created a Multiclass Text Classifier that classifies tweets as either having JOY, SADNESS, or ANGER.
I used the Twitter Emotion Dataset and BERT to do Transfer Learning with PyTorch and HuggingFace.