diff --git a/Chatbot.py b/Chatbot.py new file mode 100644 index 0000000000..e57be9835a --- /dev/null +++ b/Chatbot.py @@ -0,0 +1,15 @@ +from chatterbot import ChatBot +from chatterbot.trainers import ChatterBotCorpusTrainer + +# Create a new instance of a ChatBot +chatbot = ChatBot('Example Bot') + +# Create a new trainer for the chatbot +trainer = ChatterBotCorpusTrainer(chatbot) + +# Train the chatbot based on the english corpus +trainer.train("chatterbot.corpus.english") + +# Get a response for some input text +response = chatbot.get_response("Hello, how are you?") +print(response)