Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
efriis committed Apr 24, 2024
1 parent 7d00254 commit ec19ff6
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,8 @@ def lazy_parse(self, blob: Blob, is_batch: bool = False) -> Iterator[Document]:
start_page += num_pages

else:
if not blob.path:
raise ValueError("Blob path is required for non-PDF files.")
with open(blob.path, "rb") as f:
response = self._get_response({"document": f})
result = parse_output(response, self.output_type)
Expand Down Expand Up @@ -339,6 +341,8 @@ def lazy_parse(self, blob: Blob, is_batch: bool = False) -> Iterator[Document]:
start_page += num_pages

else:
if not blob.path:
raise ValueError("Blob path is required for non-PDF files.")
with open(blob.path, "rb") as f:
response = self._get_response({"document": f})

Expand All @@ -358,6 +362,8 @@ def lazy_parse(self, blob: Blob, is_batch: bool = False) -> Iterator[Document]:

start_page += num_pages
else:
if not blob.path:
raise ValueError("Blob path is required for non-PDF files.")
with open(blob.path, "rb") as f:
response = self._get_response({"document": f})

Expand Down

0 comments on commit ec19ff6

Please sign in to comment.