Open nvp18 opened 5 years ago
Here's one way to go about it. Create a training.py in your django app folder. Inside training.py create your training data as a list
static_qa = [
"Hello", "Hi there!",
"How are you doing", "I'm doing great, thank you for asking!",
]
in your views.py
from .training import static_qa
then after you create a chatterbot instance:
trainer = ListTrainer(chatterbot)
try:
trainer.train(static_qa) # static_qa list
except Exception as e:
logging.error(f"error training static qa = {e}")
List Trainer: [####################] 100%
i am using django for chatterbot i want to train the chatbot using seperate train .py file when i import the settings from chatterbot.ext.django_chatterbot i am getting an error
can you help me on this
the program that i have written is