let faux_model_file = include_str!("./perform_contact_spam_filter_model.json");
let classifier = Classifier::new_from_pre_trained(&mut std::io::Cursor::new(faux_model_file)).expect("Failed to load spam filter model");
Without the need to touch the file system?
It seems like it should take something more like a &str, and then the user is responsible for however that &str gets to the function.
Would it be possible (and a good idea?) to change the required File type to Reader here?
pub fn new_from_pre_trained(file: &mut File) -> Result<Self, io::Error> {
So something like this can be performed:
Without the need to touch the file system?
It seems like it should take something more like a &str, and then the user is responsible for however that &str gets to the function.