Garfieldgx/DataSet_for_thesis
Preview • Updated • 8
How to use Garfieldgx/Severe-js100-Sentiment with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="Garfieldgx/Severe-js100-Sentiment") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Garfieldgx/Severe-js100-Sentiment")
model = AutoModelForSequenceClassification.from_pretrained("Garfieldgx/Severe-js100-Sentiment")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 AutoTrain"}' https://api-inference.huggingface.co/models/Garfieldgx/autotrain-severe-js100-sentiment-45485113858
Or Python API:
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model = AutoModelForSequenceClassification.from_pretrained("Garfieldgx/autotrain-severe-js100-sentiment-45485113858", use_auth_token=True)
tokenizer = AutoTokenizer.from_pretrained("Garfieldgx/autotrain-severe-js100-sentiment-45485113858", use_auth_token=True)
inputs = tokenizer("I love AutoTrain", return_tensors="pt")
outputs = model(**inputs)