MCPcopy
hub / github.com/langchain-ai/langchain / get_images

Function get_images

templates/rag-multi-modal-mv-local/ingest.py:71–83  ·  view source on GitHub ↗

Extract images. :param img_path: A string representing the path to the images.

(img_path)

Source from the content-addressed store, hash-verified

69
70
71def get_images(img_path):
72 """
73 Extract images.
74
75 :param img_path: A string representing the path to the images.
76 """
77 # Get image URIs
78 pil_images = [
79 Image.open(os.path.join(img_path, image_name))
80 for image_name in os.listdir(img_path)
81 if image_name.endswith(".jpg")
82 ]
83 return pil_images
84
85
86def resize_base64_image(base64_string, size=(128, 128)):

Callers 1

ingest.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected