Perform Text Classification with No Context Required
Source:R/ez.R
hf_ez_zero_shot_classification.RdThis task is super useful to try out classification with zero code, you simply pass a sentence/paragraph and the possible labels for that sentence, and you get a result.
Examples
if (FALSE) { # \dontrun{
# Load the default model
ez <- hf_ez_zero_shot_classification()
# Classify the string
ez$infer(
string = paste(
"Hi, I recently bought a device from your company but it is not working",
"as advertised and I would like to get reimbursed!"
),
candidate_labels = c("refund", "legal", "faq")
)
} # }