0
Using the library manual chatterbot
I tried to make a simple chatbot, however, when I have it run on the console of pycharm
appears the following error:
Modulenotfounderror: No module named 'pytz'
It is also giving problem in the lines I marked with a #
That’s the chatterbot code:
# -*- encodding: utf-8 -*-
from chatterbot.trainers import ListTrainer
from chatterbot import ChatBot
bot = ChatBot('Futaba', read_only=True)
conversa = ['Oi', 'Olá', 'Hey!', 'E aí!']
bot.set_trainer(ListTrainer) #
bot.train(conversa) #
while True:
quest = input('Você')
response = bot.get_response(quest)
if float(response.confident) > 0.5:
print('Futaba', response)
else:
print('Eu não entendi.')
Have you tried embedding the pytz? command module:
pip install pytz
– sant0will
I tried, solved this problem, but it appeared this: Attributeerror: 'Chatbot' Object has no attribute 'set_trainer'
– Mariana Bayonetta