Skip to content

Commit

Permalink
Merge pull request #1 from abhuman/abhuman-patch-1
Browse files Browse the repository at this point in the history
Create Chatbot.py
  • Loading branch information
abhuman authored Oct 19, 2023
2 parents a5a1db1 + 5330ac2 commit 74cad4a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Chatbot.py
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 74cad4a

Please sign in to comment.