dair-ai/emotion
Viewer β’ Updated β’ 437k β’ 17k β’ 456
How to use KEERTHANA6805/bert-emotion with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="KEERTHANA6805/bert-emotion") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("KEERTHANA6805/bert-emotion")
model = AutoModelForSequenceClassification.from_pretrained("KEERTHANA6805/bert-emotion", device_map="auto")# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("KEERTHANA6805/bert-emotion")
model = AutoModelForSequenceClassification.from_pretrained("KEERTHANA6805/bert-emotion", device_map="auto")This model classifies text into 6 emotion categories:
Model: bert-base-uncased
Dataset: emotion (Hugging Face datasets library)
from transformers import pipeline
classifier = pipeline("text-classification", model="KEERTHANA6805/bert-emotion")
classifier("I am so happy today!")
Base model
google-bert/bert-base-uncased
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="KEERTHANA6805/bert-emotion")