class_docstr: Loader that loads the captions of an image
class_docstr_tok: ["Loader","that","loads","the","captions","of","an","image"]
code: def load(self, prompt=None) -> List[Document]:
      if self.processor is None or self.model is None:
          self.load_model()
      results = []
      for path_image in self.image_paths:
          caption, metadata = self._get_captions_and_metadata(
              model=self.model,
              processor=self.processor,
              path_image=path_image,
              prompt=prompt,
          )
          doc = Document(page_content=caption, metadata=metadata)
          results.append(doc)
  
      return results
  
file_path: h2ogpt/src/image_captions.py
imports: from typing import List, Union, Any, Tuple
  import requests
  from langchain.docstore.document import Document
  from langchain.document_loaders import ImageCaptionLoader
  from utils import get_device, NullContext, clear_torch_cache
  from importlib.metadata import distribution, PackageNotFoundError
label_desc: Use image node_id 5 for calling the H2OImageCaptionLoader obj's underlying member method code with example usage: obj.load(prompt) and returns: results