PhaniManda/autotrain-data-test-token-classification
Preview • Updated • 5
How to use PhaniManda/autotrain-test-token-classification-68284137539 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("token-classification", model="PhaniManda/autotrain-test-token-classification-68284137539") # Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("PhaniManda/autotrain-test-token-classification-68284137539")
model = AutoModelForTokenClassification.from_pretrained("PhaniManda/autotrain-test-token-classification-68284137539")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/PhaniManda/autotrain-test-token-classification-68284137539
Or Python API:
from transformers import AutoModelForTokenClassification, AutoTokenizer
model = AutoModelForTokenClassification.from_pretrained("PhaniManda/autotrain-test-token-classification-68284137539", use_auth_token=True)
tokenizer = AutoTokenizer.from_pretrained("PhaniManda/autotrain-test-token-classification-68284137539", use_auth_token=True)
inputs = tokenizer("I love AutoTrain", return_tensors="pt")
outputs = model(**inputs)