paultltc commited on
Commit
7a252b5
·
1 Parent(s): 734d973
Files changed (1) hide show
  1. tool.py +2 -2
tool.py CHANGED
@@ -238,7 +238,7 @@ class VisualRAGTool(Tool):
238
 
239
  return pages
240
 
241
- def _embed_images(self, pages: List[Page]) -> List[torch.Tensor]:
242
  """Embeds the images using the model."""
243
  """Example script to run inference with ColPali (ColQwen2)"""
244
  # run inference - docs
@@ -268,7 +268,7 @@ class VisualRAGTool(Tool):
268
  pgs = self.preprocess(files, contextualize=contextualize, api_key=api_key or self.api_key)
269
 
270
  # Embed the images
271
- embds = self._embed_images(pgs)
272
 
273
  # Overwrite the database if necessary
274
  if overwrite_db:
 
238
 
239
  return pages
240
 
241
+ def compute_embeddings(self, pages: List[Page]) -> List[torch.Tensor]:
242
  """Embeds the images using the model."""
243
  """Example script to run inference with ColPali (ColQwen2)"""
244
  # run inference - docs
 
268
  pgs = self.preprocess(files, contextualize=contextualize, api_key=api_key or self.api_key)
269
 
270
  # Embed the images
271
+ embds = self.compute_embeddings(pgs)
272
 
273
  # Overwrite the database if necessary
274
  if overwrite_db: