Guest User

Untitled

a guest
Dec 18th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. import logging
  2.  
  3. from rasa_core import utils, train, run
  4. from rasa_core.training import interactive
  5. from rasa_core.interpreter import RasaNLUInterpreter
  6.  
  7. logger = logging.getLogger(__name__)
  8.  
  9.  
  10. def train_agent(interpreter):
  11. return train.train_dialogue_model(domain_file="domain.yml",
  12. stories_file="data/stories.md",
  13. output_path="models/dialogue",
  14. interpreter=interpreter,
  15. policy_config='nlu_config.yml'
  16. )
  17.  
  18.  
  19. if __name__ == '__main__':
  20. utils.configure_colored_logging(loglevel="INFO")
  21. interpreter = RasaNLUInterpreter('./models/default/healthbot')
  22. agent = train_agent(interpreter)
  23. interactive.run_interactive_learning(agent, stories='data/stories.md')
Add Comment
Please, Sign In to add comment