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
Return Predicted Labels in Order of Input Labels
#18
by KunzMachineLearning - opened
Hello: I am doing a batch scoring of texts and would like to have scores and the labels returned not in the order of highest probability but rather in the order of the labels sent into the model. This will allow me to create a pandas dataframe with scores / labels in consistent order and not have to sort the scores. Thanks!