Poetry fixes (#1382)

This commit is contained in:
Dev Khant
2024-06-06 23:11:46 +05:30
committed by GitHub
parent a4bfd9cfc6
commit b0e436d9c4
8 changed files with 2922 additions and 4049 deletions

View File

@@ -10,11 +10,11 @@ class UnstructuredLoader(BaseLoader):
def load_data(self, url):
"""Load data from an Unstructured file."""
try:
from langchain_community.document_loaders import \
UnstructuredFileLoader
import unstructured # noqa: F401
from langchain_community.document_loaders import UnstructuredFileLoader
except ImportError:
raise ImportError(
'Unstructured file requires extra dependencies. Install with `pip install --upgrade "embedchain[dataloaders]"`' # noqa: E501
'Unstructured file requires extra dependencies. Install with `pip install "unstructured[local-inference, all-docs]"`' # noqa: E501
) from None
loader = UnstructuredFileLoader(url)