Perform Inference with the Intent Classification Model
Perform inference with an Intent Classification model, on a single input string or a list of input strings. For each input string, this will return the predicted intent label, which is one of the user-defined classes that the model was trained on.
Arguments
- text str | list[str]
A string or a list of strings to classify. The model will return a label for each input string.
Response
A list[str]
, each being the predicted intent label for the corresponding input string.
- Python
from artifex import Artifex
intent_classifier = Artifex().intent_classifier
# NOTE: train your Intent Classification model before
# using it for inference.
label = intent_classifier("I forgot to set up that meeting with John, could you do that for me?")
print(label)
- Response
["schedule_meeting"]