severo/autonlp-data-sentiment_detection-3c8bcd36
Preview โข Updated โข 18
How to use severo/autonlp-sentiment_detection-1781580 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="severo/autonlp-sentiment_detection-1781580") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("severo/autonlp-sentiment_detection-1781580")
model = AutoModelForSequenceClassification.from_pretrained("severo/autonlp-sentiment_detection-1781580")YAML Metadata Error:"tags" must be an array
debug - I want to update this model
You can use cURL to access this model:
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "I love AutoNLP"}' https://api-inference.huggingface.co/models/severo/autonlp-sentiment_detection-1781580
Or Python API:
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model = AutoModelForSequenceClassification.from_pretrained("severo/autonlp-sentiment_detection-1781580", use_auth_token=True)
tokenizer = AutoTokenizer.from_pretrained("severo/autonlp-sentiment_detection-1781580", use_auth_token=True)
inputs = tokenizer("I love AutoNLP", return_tensors="pt")
outputs = model(**inputs)