alvp/autonlp-data-alberti-stanza-names
Preview • Updated • 201
How to use alvp/alberti-stanzas with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="alvp/alberti-stanzas") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("alvp/alberti-stanzas")
model = AutoModelForSequenceClassification.from_pretrained("alvp/alberti-stanzas")YAML Metadata Error:"tags" must be an array
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"}' /static-proxy?url=https%3A%2F%2Fapi-inference.huggingface.co%2Fmodels%2Falvp%2Fautonlp-alberti-stanza-names-34318169
Or Python API:
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model = AutoModelForSequenceClassification.from_pretrained("alvp/autonlp-alberti-stanza-names-34318169", use_auth_token=True)
tokenizer = AutoTokenizer.from_pretrained("alvp/autonlp-alberti-stanza-names-34318169", use_auth_token=True)
inputs = tokenizer("I love AutoNLP", return_tensors="pt")
outputs = model(**inputs)