pub struct ModelManager { /* private fields */ }Expand description
Downloads and caches model bundles from Hugging Face
This is mainly useful if you want direct control over the Hugging Face cache directory or want to prefetch assets before building a pipeline.
Implementations§
Source§impl ModelManager
impl ModelManager
Sourcepub fn new() -> Result<Self, ApiError>
pub fn new() -> Result<Self, ApiError>
Create a model manager using the default Hugging Face cache
Sourcepub fn with_cache_dir(cache_dir: PathBuf) -> Result<Self, ApiError>
pub fn with_cache_dir(cache_dir: PathBuf) -> Result<Self, ApiError>
Create a model manager using a custom cache directory
Sourcepub fn ensure_base(&self) -> Result<ModelBundle, ApiError>
pub fn ensure_base(&self) -> Result<ModelBundle, ApiError>
Ensure the base Parakeet model bundle is cached locally
The returned ModelBundle points at the resolved snapshot directory
inside the Hugging Face cache.
Auto Trait Implementations§
impl Freeze for ModelManager
impl !RefUnwindSafe for ModelManager
impl Send for ModelManager
impl Sync for ModelManager
impl Unpin for ModelManager
impl UnsafeUnpin for ModelManager
impl !UnwindSafe for ModelManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more