Skip to content

Commit

Permalink
Fix Images
Browse files Browse the repository at this point in the history
  • Loading branch information
pprados committed Jan 13, 2025
1 parent 66f97cf commit 0e6c904
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
import io
import logging
from abc import abstractmethod
from typing import TYPE_CHECKING, Iterator, Literal
from typing import TYPE_CHECKING, Iterable, Iterator, Literal

import numpy
import numpy as np
from langchain_core.documents import Document
from langchain_core.language_models import BaseChatModel
from langchain_core.messages import HumanMessage

if TYPE_CHECKING:
from PIL.Image import Image

from langchain_community.document_loaders.base import BaseBlobParser
from langchain_community.document_loaders.blob_loaders import Blob

if TYPE_CHECKING:
from PIL.Image import Image

logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -167,7 +167,7 @@ def __init__(
self,
*,
format: Literal["text", "markdown", "html"] = "text",
langs: list[str] = ("eng",),
langs: Iterable[str] = ("eng",),
):
"""
Initializes the TesseractBlobParser.
Expand All @@ -179,7 +179,7 @@ def __init__(
The languages to use for OCR.
"""
super().__init__(format=format)
self.langs = langs
self.langs = list(langs)

def _analyze_image(self, img: "Image") -> str:
"""
Expand Down

0 comments on commit 0e6c904

Please sign in to comment.