stanfordnlp/imdb
Viewer • Updated • 100k • 177k • 472
How to use ChennabathniArjun/sentiment_model with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="ChennabathniArjun/sentiment_model") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("ChennabathniArjun/sentiment_model")
model = AutoModelForSequenceClassification.from_pretrained("ChennabathniArjun/sentiment_model", device_map="auto")# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("ChennabathniArjun/sentiment_model")
model = AutoModelForSequenceClassification.from_pretrained("ChennabathniArjun/sentiment_model", device_map="auto")Base model
google-bert/bert-base-uncased
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="ChennabathniArjun/sentiment_model")