extern crate failure;
use rust_bert::pipelines::sequence_classification::SequenceClassificationModel;
fn main() -> failure::Fallible<()> {
let sequence_classification_model = SequenceClassificationModel::new(Default::default())?;
let input = [
"Probably my all-time favorite movie, a story of selflessness, sacrifice and dedication to a noble cause, but it's not preachy or boring.",
"This is a neutral sentence.",
"If you like original gut wrenching laughter you will like this movie. If you are young or old then you will love this movie, hell even my mom liked it.",
];
let output = sequence_classification_model.predict_multilabel(&input, 0.05);
for label in output {
println!("{:?}", label);
}
Ok(())
}