Skip to content

Commit

Permalink
DESCRIPTION to ImageCaption Ingredient
Browse files Browse the repository at this point in the history
  • Loading branch information
parkervg committed Jun 21, 2024
1 parent d45bed5 commit aa83a8c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions blendsql/ingredients/builtin/vqa/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ def __call__(


class ImageCaption(MapIngredient):
DESCRIPTION = """
If we need to generate a caption for an image stored in the database, we can use the scalar function to map to a new column:
`{{ImageCaption('table::column')}}`
"""

def run(self, model: Model, values: List[bytes], **kwargs):
"""Generates a caption for all byte images passed to it."""
if not all(isinstance(value, bytes) for value in values):
Expand Down

0 comments on commit aa83a8c

Please sign in to comment.