From e5b61cd0c15f458b40f3ddd9b554b54bdcab5a35 Mon Sep 17 00:00:00 2001 From: invoker Date: Wed, 12 Apr 2023 14:22:39 +0800 Subject: [PATCH] formatting code --- pipelines/pipelines/nodes/file_converter/pdf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pipelines/pipelines/nodes/file_converter/pdf.py b/pipelines/pipelines/nodes/file_converter/pdf.py index 670335a67c42..66341d9e87dc 100644 --- a/pipelines/pipelines/nodes/file_converter/pdf.py +++ b/pipelines/pipelines/nodes/file_converter/pdf.py @@ -209,7 +209,8 @@ 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()