Module grpc_vision_svc::image_captioning::model_loader

source ·

Structs§

  • Model is 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.
  • ModelConfig is a struct representing the model data in the config file. It corresponds to a single [[model]] section in the TOML document.
  • ModelLoader is a struct used to load models from the Hugging Face API.

Enums§

  • ModelLoaderError is 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§

  • ModelLoaderApi is a trait that abstracts the API used to retrieve hf repositories. Primarily used for dependency injection and testing purposes.
  • ModelLoaderApiRepo is a trait that abstracts the repository API methods. It provides a single method get that retrieves a file from the repository. This trait is used for dependency injection and testing purposes.

Type Aliases§