The demo.py script provides the following command-line interface for deploying the font detection demo.
usage: demo.py [-h] [-d DEVICE] [-c CHECKPOINT] [-m {resnet18,resnet34,resnet50,resnet101,deepfont}] [-f] [-z SIZE] [-s] [-p PORT] [-a ADDRESS]
optional arguments:
-h, --help show this help message and exit
-d DEVICE, --device DEVICE
GPU devices to use (default: 0), -1 for CPU
-c CHECKPOINT, --checkpoint CHECKPOINT
Trainer checkpoint path (default: None). Use link as huggingface://<user>/<repo>/<file> for huggingface.co models, currently only supports model file in the root
directory.
-m {resnet18,resnet34,resnet50,resnet101,deepfont}, --model {resnet18,resnet34,resnet50,resnet101,deepfont}
Model to use (default: resnet18)
-f, --font-classification-only
Font classification only (default: False)
-z SIZE, --size SIZE Model feature image input size (default: 512)
-s, --share Get public link via Gradio (default: False)
-p PORT, --port PORT Port to use for Gradio (default: 7860)
-a ADDRESS, --address
Address to use for Gradio (default: 127.0.0.1)