I got it working with the following example code:
#!/bin/bash
rasa train nlu --config config.yml --nlu nlu.yml --out ./ --fixed-model-name rasaModel
and
#python3
from rasa.core.agent import Agent
import asyncio
import json
model_path = "rasaModel.tar.gz"
agent = Agent.load(model_path)
print("NLU model loaded. Type a message and press enter to parse it.")
while True:
print("Next message:")
try:
message = input().strip()
except (EOFError, KeyboardInterrupt):
print("Wrapping up command line chat...")
break
result = asyncio.run(agent.parse_message(message))
print(json.dumps(result, indent=2))