from chatterbot import ChatBot
from chatterbot.trainers import ListTrainer
import os
bot = ChatBot('Bot')
bot.set_trainer(ListTrainer)
for files in os.listdir('D:/Anaconda3/Lib/site-packages/chatterbot_corpus/data/english'):
data = open('D:/Anaconda3/Lib/site-packages/chatterbot_corpus/data/english' + files, 'r').readlines()
bot.train(data)
while True:
message = input('You')
if message.strip() != 'Bye':
reply = bot.get_response(message)
print('ChatBot :', reply)
if message.strip() == 'Bye':
print('ChatBot : Bye')
break
I'm getting an error:
Traceback (most recent call last): File "C:\Users\nakulmagotra\Desktop\chatbot_train.py", line 1, in from chatterbot import ChatBot ModuleNotFoundError: No module named 'chatterbot'
I'm a complete noob to Chatterbot . Thanks.