def get_parser() -> ArgumentParser:
    """Get command line arguments.

    Example:
        Example for Torch Inference.
        >>> python tools/inference/gradio_inference.py  \
        ...     --weights ./results/padim/mvtecad/bottle/weights/torch/model.pt

    Returns:
        ArgumentParser: Argument parser for gradio inference.
    """
    parser = ArgumentParser()
    parser.add_argument("--weights", type=Path, required=True, help="Path to model weights")
    parser.add_argument("--share", type=bool, required=False, default=False, help="Share Gradio `share_url`")

    return parser
Get command line arguments.

    Example:
        Example for Torch Inference.
        >>> python tools/inference/gradio_inference.py          ...     --weights ./results/padim/mvtecad/bottle/weights/torch/model.pt

    Returns:
        ArgumentParser: Argument parser for gradio inference.
    
tools/inference/gradio_inference.py