vipr.plugins.huggingface package¶
Submodules¶
vipr.plugins.huggingface.controller module¶
vipr.plugins.huggingface.download module¶
- vipr.plugins.huggingface.download.download_models(extension_name: str, app=None)¶
Download models for a specific extension from Hugging Face.
Each repository entry in the config must provide: -
root_dir_env_var: name of the environment variable that holds thelocal root directory for this domain (e.g.
REFLECTOMETRY_ROOT_DIR)repo_id: the HuggingFace repository identifierfiles: list of{source, target}entries wheresourceis the path within the HF repo andtargetis the path relative to the root directory defined byroot_dir_env_var
- Parameters:
extension_name – Key of the repository entry in
huggingface.repositoriesapp – The VIPR app instance
vipr.plugins.huggingface.huggingface module¶
- class vipr.plugins.huggingface.huggingface.HuggingFace(app)¶
Bases:
object- download_for_extension(extension_name)¶
Utility method to download models for a specific extension.
- Parameters:
extension_name – Name of the extension
- ensure_models_downloaded()¶
Ensure all configured models are downloaded.
- init_hook(app)¶
Hook called after command line arguments are parsed
Module contents¶
- vipr.plugins.huggingface.load(app)¶