# How to direct output of interactive training to Console

**URL:** <https://forum.rasa.com/t/how-to-direct-output-of-interactive-training-to-console/9712>\
**Category:** Rasa Open Source\
**Created:** [May 14, 2019, 8:50am UTC](https://forum.rasa.com/t/how-to-direct-output-of-interactive-training-to-console/9712 "2019-05-14T08:50:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shammy45](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/shammy45/32/2869_2.png) [@shammy45](https://forum.rasa.com/u/shammy45)\
**Post date:** [May 14, 2019, 8:50am UTC](https://forum.rasa.com/t/how-to-direct-output-of-interactive-training-to-console/9712/1 "2019-05-14T08:50:14Z")

</div>

Here is my code

asa-core 0.14.3 rasa-core-sdk 0.14.0 rasa-nlu 0.15.0

python3.7

When I execute the following code,

from **future** import absolute\_import from **future** import division from **future** import print\_function from **future** import unicode\_literals

import logging import rasa\_core

from rasa\_core.run import serve\_application from rasa\_core import config from rasa\_core.agent import Agent #from rasa\_core.channels.console import ConsoleInputChannel from rasa\_core.interpreter import RegexInterpreter from rasa\_core.policies.keras\_policy import KerasPolicy from rasa\_core.policies.memoization import MemoizationPolicy from rasa\_core.interpreter import RasaNLUInterpreter

logger = logging.getLogger( **name** )

def run\_weather\_online(input\_channel, interpreter, domain\_file=“weather\_domain.yml”, training\_data\_file=‘data/stories.md’): agent = Agent(‘weather\_domain.yml’, policies = [MemoizationPolicy(max\_history=2), KerasPolicy(max\_history=4)]) data = agent.load\_data(training\_data\_file) agent.train(data) rasa\_core.run.serve\_application(agent ,channel=‘cmdline’) #interactive.run\_interactive\_learning(agent, training\_data\_file) return agent

if **name** == ’ **main** ‘: logging.basicConfig(level=“INFO”) nlu\_interpreter = RasaNLUInterpreter(’./models/nlu/default/weatherbot’) #run\_weather\_online(ConsoleInputChannel(), nlu\_interpreter) run\_weather\_online(‘cmdline’, nlu\_interpreter)

Output NFO:rasa\_core.policies.keras\_policy:Done fitting keras policy model INFO:root:Rasa Core server is up and running on [http://localhost:5005](http://localhost:5005/) Bot loaded. Type a message and press enter (use ‘/stop’ to exit): Your input -\> Hello Hello! How can I help? 127.0.0.1 - - [2019-05-14 00:09:00] “POST /webhooks/rest/webhook?stream=true&token= HTTP/1.1” 200 222 0.212841 Your input -\> how is weather in Italy 127.0.0.1 - - [2019-05-14 00:09:10] “POST /webhooks/rest/webhook?stream=true&token= HTTP/1.1” 200 154 0.009423 Your input -\> 127.0.0.1 - - [2019-05-14 00:09:23] “GET / HTTP/1.1” 200 144 0.000800 127.0.0.1 - - [2019-05-14 00:09:32] “GET / HTTP/1.1” 200 144 0.000892 Your input -\> ok 127.0.0.1 - - [2019-05-14 00:10:07] “POST /webhooks/rest/webhook?stream=true&token= HTTP/1.1” 200 154 0.011861 Your input -\>

---

<div class="post-metadata">

**Author:** ![custodio](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/custodio/32/520_2.png) [@custodio](https://forum.rasa.com/u/custodio)\
**Post date:** [May 14, 2019, 6:43pm UTC](https://forum.rasa.com/t/how-to-direct-output-of-interactive-training-to-console/9712/2 "2019-05-14T18:43:34Z")

</div>

Why not running the interactive learning on the console itself?

Try: python3.6 -m rasa\_core.train interactive -o models/current/dialogue -d domain.yml -s data/core/stories.md --nlu models/current/nlu --endpoints endpoints.yml

Replace the models/stories/nlu/endpoints with the correct files and directories.

Regards,

---

<div class="post-metadata">

**Author:** ![shammy45](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/shammy45/32/2869_2.png) [@shammy45](https://forum.rasa.com/u/shammy45)\
**Post date:** [May 15, 2019, 10:58am UTC](https://forum.rasa.com/t/how-to-direct-output-of-interactive-training-to-console/9712/3 "2019-05-15T10:58:15Z")

</div>

Thanks it works !!
