#!/usr/bin/env python
"""
Script used to train a rasa model in python
File taken from F21CA course instructions
https://github.com/HWUConvAgentsProject/CA2020_instructions/blob/master/rasa_tutorial/nlu/train_nlu.py
"""


from rasa.nlu.model import Trainer
from rasa.nlu import config
from rasa.shared.nlu.training_data.loading import load_data

# loading training data
training_data = load_data('./data/nlu.yml')

# initialising the trainer
trainer = Trainer(config.load("config.yml"))

# training
trainer.train(training_data)

# saving the model in the specified directory
trainer.persist('./models/')

42036dcafbae3c6427dc824c9d65272e46766339
<mask token>

<mask token>
trainer.train(training_data)
trainer.persist('./models/')

<mask token>
training_data = load_data('./data/nlu.yml')
trainer = Trainer(config.load('config.yml'))
trainer.train(training_data)
trainer.persist('./models/')

<mask token>
from rasa.nlu.model import Trainer
from rasa.nlu import config
from rasa.shared.nlu.training_data.loading import load_data
training_data = load_data('./data/nlu.yml')
trainer = Trainer(config.load('config.yml'))
trainer.train(training_data)
trainer.persist('./models/')

#!/usr/bin/env python
"""
Script used to train a rasa model in python
File taken from F21CA course instructions
https://github.com/HWUConvAgentsProject/CA2020_instructions/blob/master/rasa_tutorial/nlu/train_nlu.py
"""


from rasa.nlu.model import Trainer
from rasa.nlu import config
from rasa.shared.nlu.training_data.loading import load_data

# loading training data
training_data = load_data('./data/nlu.yml')

# initialising the trainer
trainer = Trainer(config.load("config.yml"))

# training
trainer.train(training_data)

# saving the model in the specified directory
trainer.persist('./models/')
