dair-ai/emotion
Viewer • Updated • 437k • 19.9k • 453
How to use Parth1612/pp_albert_ft_emotions with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="Parth1612/pp_albert_ft_emotions") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Parth1612/pp_albert_ft_emotions")
model = AutoModelForSequenceClassification.from_pretrained("Parth1612/pp_albert_ft_emotions", device_map="auto")# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Parth1612/pp_albert_ft_emotions")
model = AutoModelForSequenceClassification.from_pretrained("Parth1612/pp_albert_ft_emotions", device_map="auto")
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Parth1612/pp_albert_ft_emotions")