Skip to content

Commit

Permalink
formatting code
Browse files Browse the repository at this point in the history
  • Loading branch information
invokerbyxv committed Apr 13, 2023
1 parent e5b61cd commit 0f8a092
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pipelines/pipelines/nodes/file_converter/pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,9 @@ def convert(
try:
images = convert_from_path(file_path)
for image in images:
temp_img = tempfile.NamedTemporaryFile(dir=os.path.dirname(os.path.realpath(__file__)), suffix=".jpeg",
delete=False)
temp_img = tempfile.NamedTemporaryFile(
dir=os.path.dirname(os.path.realpath(__file__)), suffix=".jpeg", delete=False
)
image.save(temp_img.name)
pages.append(self.image_2_text.convert(temp_img.name)[0]["content"])
temp_img.close()
Expand Down

0 comments on commit 0f8a092

Please sign in to comment.