Which is your favourite social media?
Anonymous Poll
16%
Twitter
55%
Instagram
23%
Facebook
5%
Reddit
Follow my social handles if you interested: akpythonyt - Instagramπ
AK Python on twitter π
AK Python on twitter π
Video Update: Next video is about Creating AI chatbotπ. Video will be uploaded soonπ€
#creating chatbot
from chatterbot import ChatBot
chatbot=ChatBot(
'Akpython',
storage_adapter='chatterbot.storage.SQLStorageAdapter',
logic_adapter=[
'chatterbot.logic.MathematicalEvaluation',
'chatterbot.logic.TimeLogicAdapter',
'chatterbot.logic.BestMatch',
{
'import_path':'chatterbot.logic.BestMatch',
'default_response':'I am sorry,I do not understand',
'maximum_similarity_threshold':0.90
}
],
database_uri='sqlite:///database.sqlite3'
)
#Training
from chatterbot.trainers import ListTrainer
trainer=ListTrainer(chatbot)
trainingdata=open('/home/arun/Documents/Trainingdata').read().splitlines()
#Training the corpus
from chatterbot.trainers import ChatterBotCorpusTrainer
trainercorpus=ChatterBotCorpusTrainer(chatbot)
trainercorpus.train(
'chatterbot.corpus.english'
)
#BetterBot
name=input("Enter your name:")
print('Welcome to our Hotel',name,'Let me know how can I help you?')
while True:
request=input(name+':')
if request=='Bye'or request=='bye':
print("Bot:Bye")
break
else:
response=chatbot.get_response(request)
print('Bot:',response)
from chatterbot import ChatBot
chatbot=ChatBot(
'Akpython',
storage_adapter='chatterbot.storage.SQLStorageAdapter',
logic_adapter=[
'chatterbot.logic.MathematicalEvaluation',
'chatterbot.logic.TimeLogicAdapter',
'chatterbot.logic.BestMatch',
{
'import_path':'chatterbot.logic.BestMatch',
'default_response':'I am sorry,I do not understand',
'maximum_similarity_threshold':0.90
}
],
database_uri='sqlite:///database.sqlite3'
)
#Training
from chatterbot.trainers import ListTrainer
trainer=ListTrainer(chatbot)
trainingdata=open('/home/arun/Documents/Trainingdata').read().splitlines()
#Training the corpus
from chatterbot.trainers import ChatterBotCorpusTrainer
trainercorpus=ChatterBotCorpusTrainer(chatbot)
trainercorpus.train(
'chatterbot.corpus.english'
)
#BetterBot
name=input("Enter your name:")
print('Welcome to our Hotel',name,'Let me know how can I help you?')
while True:
request=input(name+':')
if request=='Bye'or request=='bye':
print("Bot:Bye")
break
else:
response=chatbot.get_response(request)
print('Bot:',response)
#YKYG : .aac is a popular audio extension.Do you know it's Full form?
Anonymous Quiz
20%
Audio Advanced coding
52%
Advanced audio coding
22%
Audio augmented coding
7%
A Audio coding
New video preparation is started today.Scripting is going on.I will meet you on end of this week.