Inference / run.py
nekomiro's picture
Duplicate from DIFF-SVCModel/Inference
79f7f06
raw
history blame contribute delete
396 Bytes
import importlib
import os
from utils.hparams import set_hparams, hparams
set_hparams(print_hparams=False)
def run_task():
assert hparams['task_cls'] != ''
pkg = ".".join(hparams["task_cls"].split(".")[:-1])
cls_name = hparams["task_cls"].split(".")[-1]
task_cls = getattr(importlib.import_module(pkg), cls_name)
task_cls.start()
if __name__ == '__main__':
run_task()