Skip to content

Commit

Permalink
WIP3
Browse files Browse the repository at this point in the history
  • Loading branch information
Coniferish committed Sep 13, 2024
1 parent d7032f1 commit 5f8f61e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unstructured_inference/inference/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@ def from_image_file(
images: list[Image.Image] = []
for i, im in enumerate(ImageSequence.Iterator(image)):
im = im.convert("RGB")
im.format = format # type: ignore
im.format = format
images.append(im)
except Exception as e:
if os.path.isdir(filename) or os.path.isfile(filename):
raise e
else:
raise FileNotFoundError(f'File "{filename}" not found!') from e
pages = []
for i, image in enumerate(images):
for i, image in enumerate(images): # type: ignore
page = PageLayout.from_image(
image,
image_path=filename,
Expand Down

0 comments on commit 5f8f61e

Please sign in to comment.