# Nlu\_model problem

**URL:** <https://forum.rasa.com/t/nlu-model-problem/14350>\
**Category:** Getting Started with Rasa\
**Created:** [August 14, 2019, 4:54pm UTC](https://forum.rasa.com/t/nlu-model-problem/14350 "2019-08-14T16:54:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kacperlsky](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/kacperlsky/32/4618_2.png) [@kacperlsky](https://forum.rasa.com/u/kacperlsky)\
**Post date:** [August 14, 2019, 4:54pm UTC](https://forum.rasa.com/t/nlu-model-problem/14350/1 "2019-08-14T16:54:49Z")

</div>

Hello I am starting with Rasa and for this code:

> from **future** import absolute\_import from **future** import division from **future** import print\_function from **future** import unicode\_literals
> 
> from rasa\_nlu.training\_data import load\_data
> 
> from rasa\_nlu.config import RasaNLUModelConfig
> 
> from rasa\_nlu.model import Trainer, Metadata, Interpreter from rasa\_nlu import config
> 
> def train (data, config\_file, model\_dir): training\_data = load\_data(data) configuration = config.load(config\_file) trainer = Trainer(configuration) trainer.train(training\_data) model\_directory = trainer.persist(model\_dir, fixed\_model\_name = ‘chat’)
> 
> def run(): interpreter = Interpreter.load(‘./models/nlu/default/chat’) print(interpreter.parse(‘I want to order pizza’)) #print(interpreter.parse(u’What is the reivew for the movie Die Hard?'))
> 
> if **name** == ‘ **main** ’: train(‘./data/training\_data.json’, ‘./config/config.yml’, ‘./models/nlu’) run()

I get this type of error:

> Traceback (most recent call last): File “nlu\_model.py”, line 7, in from rasa\_nlu.training\_data import load\_data ImportError: cannot import name load\_data

I kindly ask for help!

---

<div class="post-metadata">

**Author:** ![amn41](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/amn41/32/20_2.png) [@amn41](https://forum.rasa.com/u/amn41)\
**Post date:** [August 16, 2019, 12:51pm UTC](https://forum.rasa.com/t/nlu-model-problem/14350/2 "2019-08-16T12:51:42Z")

</div>

hi @kacperlsky - welcome to the forum! I suspect your code and installed version don’t match. The `rasa_nlu` module has been deprecated in favour of `rasa.nlu` . Are you on version \>1.0 ?

Also, the [Command Line Interface](https://rasa.com/docs/rasa/user-guide/command-line-interface/) is generally a simpler way to interact with rasa

---

<div class="post-metadata">

**Author:** ![FTAsr](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ftasr/32/5290_2.png) [@FTAsr](https://forum.rasa.com/u/FTAsr)\
**Post date:** [October 7, 2019, 5:12pm UTC](https://forum.rasa.com/t/nlu-model-problem/14350/3 "2019-10-07T17:12:28Z")

</div>

I’d like to use the API rather than the command line interface. Is there a .py example file similar to the above that we could follow to get things running in version \> 1.0?

For example, if I’d like to report different evaluation measures when testing a model on a specific set, what can I do with the available command line options? As a python programmer, it just sounds really strange to me that a useful toolkit like rasa lacks enough documentation on the API calls. Was this a strategic decision to just make the API unavailable?
