RASA Interpreter is slow (PYTHON)

Hello everyone,

Thank you, RASA is a really great tool, and has perfectly done what I wanted to do.

I only need to classify word (so I’m using NLU model only). I wanted to know how to perform a prediction on a sentence in less than 5 sec.

Currently, I’m using:

def rasa_test(texte): interpreter = Interpreter.load(‘./models/e5/nlu’) return interpreter.parse(texte)[‘intent_ranking’]

Is there a way to improve velocity? Maybe I can preload the model

Thank you

Yes, it seems like you don’t need to load the interpreter each time, you could load it at the beginning of your script or on server startup and pass the loaded interpreter to the parse function