Usually used for sentiment-analysis this will output the likelihood of classes of an input.
Usage
hf_ez_text_classification(
model_id = "distilbert/distilbert-base-uncased-finetuned-sst-2-english",
use_api = FALSE
)Examples
if (FALSE) { # \dontrun{
# Load the default model and use local inference
ez <- hf_ez_text_classification()
ez$infer(string = c('I like you. I love you'), flatten = FALSE)
# Use the api for inference.
ez <- hf_ez_text_classification(use_api = TRUE)
ez$infer(string = c('I like you. I love you'), flatten = FALSE)
} # }