def train_nlu(data, configs, model_dir):
training_data = load_data(data)
trainer = Trainer(config.load(configs))
trainer.train(training_data)
model_directory = trainer.persist(model_dir, fixed_model_name='weathernlu')
return model_directory
def run_nlu(model_dir):
interpreter = Interpreter.load(model_dir)
print(interpreter.parse("hello"))
我想加载多个模型来运行。如何使用解释器在我的 python 程序中加载多个模型?