Compare commits

...

1 Commits

Author SHA1 Message Date
coolneng fdbc6f0543
Add the async CLI execution of the inference 2021-07-06 18:56:50 +02:00
1 changed files with 4 additions and 4 deletions

View File

@ -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__":