GRPUI/autotrain-data-sgugit-model-v4
Preview • Updated • 6
How to use GRPUI/sgugit-model with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="GRPUI/sgugit-model") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("GRPUI/sgugit-model")
model = AutoModelForSequenceClassification.from_pretrained("GRPUI/sgugit-model")# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="GRPUI/sgugit-model")# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("GRPUI/sgugit-model")
model = AutoModelForSequenceClassification.from_pretrained("GRPUI/sgugit-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 AutoTrain"}' https://api-inference.huggingface.co/models/GRPUI/autotrain-sgugit-model-v4-92034144745
Or Python API:
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model = AutoModelForSequenceClassification.from_pretrained("GRPUI/autotrain-sgugit-model-v4-92034144745", use_auth_token=True)
tokenizer = AutoTokenizer.from_pretrained("GRPUI/autotrain-sgugit-model-v4-92034144745", use_auth_token=True)
inputs = tokenizer("I love AutoTrain", return_tensors="pt")
outputs = model(**inputs)
# Gated model: Login with a HF token with gated access permission hf auth login