From 27fd7de39a59d0d88fbddb471dd7797b61223ece Mon Sep 17 00:00:00 2001 From: Julius Unverfehrt Date: Wed, 17 Aug 2022 13:15:09 +0200 Subject: [PATCH] update pyinfra --- incl/pdf2image | 2 +- scripts/run_pipeline.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/incl/pdf2image b/incl/pdf2image index 4753c00..9bb5a86 160000 --- a/incl/pdf2image +++ b/incl/pdf2image @@ -1 +1 @@ -Subproject commit 4753c005ee926b09238977d524542f12ec4c4847 +Subproject commit 9bb5a86310f065b852e16679cf37d5c939c0cacd diff --git a/scripts/run_pipeline.py b/scripts/run_pipeline.py index 0a01287..29d3199 100644 --- a/scripts/run_pipeline.py +++ b/scripts/run_pipeline.py @@ -2,6 +2,7 @@ import argparse import json import os from glob import glob +from operator import truth from image_prediction.pipeline import load_pipeline from image_prediction.utils import get_logger @@ -33,7 +34,7 @@ def process_pdf(pipeline, pdf_path, metadata=None, page_range=None): predictions = list(pipeline(f.read(), page_range=page_range, metadata_per_image=metadata)) annotate_pdf( - pdf_path, predictions, os.path.join("/tmp", os.path.basename(pdf_path.replace(".pdf", "_annotated.pdf"))) + pdf_path, predictions, os.path.join("/tmp", os.path.basename(pdf_path.replace(".pdf", f"_{truth(metadata)}_annotated.pdf"))) ) return predictions