From 437f176baf9a1036b78d74c54245c790d4a083e1 Mon Sep 17 00:00:00 2001 From: Fran Aguilera Date: Tue, 9 Jul 2024 17:36:48 -0400 Subject: [PATCH] Not needed. --- unstructured_inference/inference/layout.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unstructured_inference/inference/layout.py b/unstructured_inference/inference/layout.py index fa5e369c..9d16fb62 100644 --- a/unstructured_inference/inference/layout.py +++ b/unstructured_inference/inference/layout.py @@ -325,7 +325,7 @@ def process_data_with_model( DocumentLayout by using a model identified by model_name.""" # Create a named temporary file without automatic deletion - with tempfile.NamedTemporaryFile(delete=False, mode="w+b") as tmp_file: + with tempfile.NamedTemporaryFile(delete=False) as tmp_file: tmp_filename = tmp_file.name tmp_file.write(data.read()) tmp_file.flush() # Make sure the file is written out