Instructions to use facebook/bart-large-mnli with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use facebook/bart-large-mnli with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-classification", model="facebook/bart-large-mnli")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("facebook/bart-large-mnli") model = AutoModelForSequenceClassification.from_pretrained("facebook/bart-large-mnli") - Inference
- Notebooks
- Google Colab
- Kaggle
JSON input when deploying in Azure ML studio
Hi everyone, I have recently deployed this model in Azure via the ML studio. When trying to test the endpoint using the JSON provided by Azure I get an internal server error. I suspect the format of the JSON is incorrect. Could someone who has deployed via Azure assist me?
Here is the JSON string provided by Azure to test:
{
"inputs": "I have a problem with my iphone that needs to be resolved asap!!",
"candidate_labels": "urgent, not urgent, phone, tablet, computer"
}
Is there anything wrong with the above? Thanks in advance :)
Did you check the logs of your deployment? you should find more detail there.
Here's a working example from Azure:
{
"inputs": "I have a problem with my iphone that needs to be resolved asap!!",
"parameters": {
"candidate_labels": "urgent, not urgent, phone, tablet, computer"
}
}