Update from felix 9c75725
Felix Hamborg commited on
How to use fhamborg/roberta-targeted-sentiment-classification-newsarticles with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="fhamborg/roberta-targeted-sentiment-classification-newsarticles") # Load model directly
from transformers import AutoTokenizer, PretrainedWrapper
tokenizer = AutoTokenizer.from_pretrained("fhamborg/roberta-targeted-sentiment-classification-newsarticles")
model = PretrainedWrapper.from_pretrained("fhamborg/roberta-targeted-sentiment-classification-newsarticles", device_map="auto")