Assistance with libraries - Getting Started with Rasa / Tutorials, Resources & Videos - Rasa Community Forum

πŸ‘‹ Introducing the Rasa Playground

Assistance with libraries

post by steves on Dec 21, 2019

stevesSteve Solun
Dec 2019

Hello dear experts,

I am learning the Data Camp course about Rasa and trying to run:

# Import necessary modules
from rasa_nlu.config import RasaNLUConfig
from rasa_nlu.model import Trainer

pipeline = [\
    "nlp_spacy",\
    "tokenizer_spacy",\
    "ner_crf"\
]

# Create a config that uses this pipeline
config = RasaNLUConfig(cmdline_args = {"pipeline":pipeline})

# Create a trainer that uses this config
trainer = Trainer(config)

# Create an interpreter by training the model
interpreter = trainer.train(training_data)

# Parse some messages
print(interpreter.parse("show me Chinese food in the centre of town"))
print(interpreter.parse("I want an Indian restaurant in the west"))
print(interpreter.parse("are there any good pizza places in the center?"))

But I get an error:

β€”> 18 trainer = Trainer(cfg) AttributeError: β€˜str’ object has no attribute β€˜get’

I am running this on my Jupyter notebook.

  1. Please advise how can I check what is wrong and how to fix it.
  2. How to check which Rasa I am using?

Any assistance with step by step explanation will be highly appreciated.

385 views