pub fn create_model( model: Models, cache_dir: &Option<PathBuf> ) -> Result<(Model, Device), Box<dyn Error>>
Creates and loads model weights from the Hugging Face Hub.
model
cache_dir
Returns a result containing a tuple of ModelWeights and Device, or an error if loading fails.
ModelWeights
Device