rasa.exceptions.ModelNotFound: No NLU or Core data for unpacked model at: 'C:/Projects/NLP/first_bot/first_bot/models/'

I am trying to use this method

from rasa.core.agent import Agent
model_path = 'C:/Projects/NLP/first_bot/first_bot/models/'
agent = Agent.load(model_path)

This is giving me the error

Traceback (most recent call last):
  File "C:/Projects/NLP/first_bot/first_bot/test1.py", line 19, in <module>
    agent = Agent.load(model_path = model_path)
  File "C:\Users\asmar\AppData\Roaming\Python\Python37\site-packages\rasa\core\agent.py", line 486, in load
    core_model, nlu_model = get_model_subdirectories(model_path)
  File "C:\Users\asmar\AppData\Roaming\Python\Python37\site-packages\rasa\model.py", line 267, in get_model_subdirectories
    unpacked_model_path
rasa.exceptions.ModelNotFound: No NLU or Core data for unpacked model at: 'C:/Projects/NLP/first_bot/first_bot/models/'.

However, there is a tar.gz model file (in unextracted form) in the same directory. Any ideas?

I have :

Python = 3.7 Rasa = 3.0.9 Rasa sdk version = 3.0.6

@AsmarAli can I ask why you following this? and from where did you get this code? It’s for which version of Rasa?

Do you have the NLU or Core data in your project?

I am following this because I am designing a custom project where training data comes from a database. I got this code from Rasa Open Source HQ repo on github. Right now, I am using training data from my local storage for training a model. I don’t know what do they mean by NLU or Core data? Is it the stories.yml or nlu.yml files?If yes, they are already in a directory named data in the project.