Module grpc_vision_svc::image_captioning::model_loader
source · Structs§
Modelis a struct representing a downloaded model. It contains the paths to the model and tokenizer files. These paths can be used to load the model and tokenizer in your ML library of choice.ModelConfigis a struct representing the model data in the config file. It corresponds to a single[[model]]section in the TOML document.ModelLoaderis a struct used to load models from the Hugging Face API.
Enums§
ModelLoaderErroris an enumeration of potential errors that can occur during the model loading process. It includes API errors, I/O errors, and parsing errors. Each variant wraps the underlying error for further inspection if necessary.
Traits§
ModelLoaderApiis a trait that abstracts the API used to retrieve hf repositories. Primarily used for dependency injection and testing purposes.ModelLoaderApiRepois a trait that abstracts the repository API methods. It provides a single methodgetthat retrieves a file from the repository. This trait is used for dependency injection and testing purposes.
Type Aliases§
Resultwith default error typeModelLoaderError.