INNER CODE UNIT · Python

model

mindee/doctr · doctr/cli/main.py:233

    model = ocr_predictor(detect_tables=args.detect_tables, **kwargs)

    _set_thresholds(model, args)
    return _to_device(model, args)


def _export_kwargs(fmt: str, args: argparse.Namespace) -> dict[str, Any]:
    """Build the keyword arguments accepted by the exporter of the requested format

    Args:
        fmt: the canonical export format
        args: the parsed command-line arguments

    Returns:
        the keyword arguments to pass to `Document.export_as`
    """
    kwargs: dict[str, Any] = {}
    if fmt in {"json", "xml"}:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…