Skip to content

Commit

Permalink
Enable toggle of printing output location after redacting from file (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
niwilso authored Aug 23, 2023
1 parent 18090c6 commit 8e1bf80
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ def redact_from_file(
fill: str = "contrast",
use_metadata: bool = True,
save_bboxes: bool = False,
verbose: bool = True,
ocr_kwargs: Optional[dict] = None,
ad_hoc_recognizers: Optional[List[PatternRecognizer]] = None,
**text_analyzer_kwargs,
Expand All @@ -167,6 +168,7 @@ def redact_from_file(
:param use_metadata: Whether to redact text in the image that
are present in the metadata.
:param save_bboxes: True if we want to save boundings boxes.
:param verbose: True to print where redacted file was written to.
:param ocr_kwargs: Additional params for OCR methods.
:param ad_hoc_recognizers: List of PatternRecognizer objects to use
for ad-hoc recognizer.
Expand Down Expand Up @@ -201,7 +203,8 @@ def redact_from_file(
**text_analyzer_kwargs,
)

print(f"Output written to {output_location}")
if verbose:
print(f"Output written to {output_location}")

return None

Expand Down

0 comments on commit 8e1bf80

Please sign in to comment.