legacy-datasets/banking77
Viewer • Updated • 13.1k • 10.7k • 51
How to use philschmid/BERT-Banking77 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="philschmid/BERT-Banking77") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("philschmid/BERT-Banking77")
model = AutoModelForSequenceClassification.from_pretrained("philschmid/BERT-Banking77")BERT-Banking77 Model Trained Using AutoTrain
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://huggingface.co/proxy/api-inference.huggingface.co/models/philschmid/autotrain-does-it-work-940131041
Or Python API:
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
model_id = 'philschmid/BERT-Banking77'
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
classifier = pipeline('text-classification', tokenizer=tokenizer, model=model)
classifier('What is the base of the exchange rates?')