code: def main(args):
      model = ocr_predictor(
          args.detection, args.recognition, pretrained=True
      )
  
      if args.path.lower().endswith(".pdf"):
          doc = DocumentFile.from_pdf(args.path)
      else:
          doc = DocumentFile.from_images(args.path)
  
      out = model(doc)
  
      for page in out.pages:
          page.show(block=not args.noblock, interactive=not args.static)
  
imports: import os
  from doctr.file_utils import is_tf_available
  from doctr.io import DocumentFile
  from doctr.models import ocr_predictor
label_desc: Use image node_id 1 for calling a global function with example usage: main(args) without return types