Exemple #1
0
def serve(args: argparse.Namespace) -> None:
    # Read a JSON configuration file, if specified
    config = DEFAULT_CONFIG
    if args.config_file is not None:
        with args.config_file as fopen:
            config = json.loads(fopen.read())

    server_sanic.run(args.port, args.workers, config)
Exemple #2
0
 def serve_inner(args: argparse.Namespace) -> None:
     server_sanic.run(args.port, args.workers, trained_models)
Exemple #3
0
def serve(args: argparse.Namespace) -> None:
    server_sanic.run(args.port, args.workers)