Guest User

Untitled

a guest
Dec 19th, 2018
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. from rasa_core.agent import Agent
  2. from rasa_core.interpreter import NaturalLanguageInterpreter
  3. from rasa_core.utils import EndpointConfig
  4. from rasa_core.run import serve_application
  5. from rasa_core.train import online
  6.  
  7. def run(dbug=False):
  8. if dbug:
  9. init_dbug_logging()
  10.  
  11. interpreter = NaturalLanguageInterpreter.create('./models/default/healthbot')
  12. action_endpoint = EndpointConfig(url='http://localhost:5055/webhook')
  13. agent = Agent.load(path='./models/dialogue', interpreter=interpreter,
  14. action_endpoint=action_endpoint)
  15. # serve_application(agent, channel='cmdline')
  16. online.serve_agent(agent)
  17.  
  18. if __name__ == "__main__":
  19. run()
Add Comment
Please, Sign In to add comment