zeroshot_classify_text
Classify texts using custom labels/categories.
In contrast with classify_text
,
this step doesn’t require a model specifically trained with the given labels. Any model from the
Hugging Face hub that is compatible with their
zeroshot classification pipeline
can be used here. By default this is the (English) valhalla/distilbart-mnli-12-3
,
for a good trade-off between model size and accuracy. If a multilingual model is needed
you could try e.g. joeddav/xlm-roberta-large-xnli
.
Note that we do not validate the model name before executing it, so make sure it corresponds to an existing model in the hub, otherwise the step will fail.
Was this page helpful?