mirror of
https://github.com/Mintplex-Labs/langchain-python.git
synced 2026-08-26 16:55:38 -04:00
5eec74d9a5
- Updated docstrings for `document_loaders` - Mass update `"""Loader that loads` to `"""Loads` @baskaryan - please, review
14 lines
454 B
Python
14 lines
454 B
Python
"""Loads image files."""
|
|
from typing import List
|
|
|
|
from langchain.document_loaders.unstructured import UnstructuredFileLoader
|
|
|
|
|
|
class UnstructuredImageLoader(UnstructuredFileLoader):
|
|
"""Loader that uses unstructured to load image files, such as PNGs and JPGs."""
|
|
|
|
def _get_elements(self) -> List:
|
|
from unstructured.partition.image import partition_image
|
|
|
|
return partition_image(filename=self.file_path, **self.unstructured_kwargs)
|