From fdbc6f0543c5e340d1392d6afbdc8232c04293f4 Mon Sep 17 00:00:00 2001 From: coolneng Date: Tue, 6 Jul 2021 18:56:50 +0200 Subject: [PATCH] Add the async CLI execution of the inference --- src/main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.py b/src/main.py index 0ef6fd7..fe3b559 100644 --- a/src/main.py +++ b/src/main.py @@ -18,17 +18,17 @@ def parse_arguments() -> Namespace: return parser.parse_args() -def execute_task(args): +async def execute_task(args): if args.task == "train": train_model(data_file=args.data_file, label_file=args.label_file) else: - prediction = infer_sequence(sequence=args.sequence) + prediction = await infer_sequence(sequence=args.sequence) print(f"Error-corrected sequence: {prediction}") -def main() -> None: +async def main() -> None: args = parse_arguments() - execute_task(args) + await execute_task(args) if __name__ == "__main__":