Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
# -*- coding: utf-8 -*-
"""Untitled4.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1-OaAIuHa_jtucy8IQz9374KQvwvX74pQ
"""
pip install chatterbot
pip install prettytable
pip install chatterbot_corpus
ttract
from chatterbot import ChatBot
bot = ChatBot('Buddy')
bot = ChatBot(
'Buddy',
storage_adapter='chatterbot.storage.SQLStorageAdapter',
database_uri='sqlite:///database.sqlite3')
from chatterbot.trainers import ListTrainer
trainer = ListTrainer(bot)
trainer.train([
'Hi',
'Hello',
'London atrractions',
'sure',
'Thanks',
'No Problem!'])
from prettytable import PrettyTable
name=input("Enter Your Name:")
print("Welcome to the Bot Service! Let me know how can I help you?")
while True:
request=input(name+':')
if request== 'London attractions' or request=='london attractions':
print("bot: sure")
myTable = PrettyTable(["London attractions"])
myTable.add_row(["Harry Potter Warner Brothers Studio"])
myTable.add_row(["Tower of London"])
myTable.add_row(["London Eye"])
myTable.add_row(["Hop-On Hop-Off Sightseeing Bus Tour"])
myTable.add_row(["Tower Bridge"])
myTable.add_row(["Madame Tussauds London"])
myTable.add_row(["The View from the Shard"])
myTable.add_row(["Sky Garden"])
myTable.add_row(["Comedy Horror Show: London Ghost Bus Tour"])
myTable.add_row(["Big Ben"])
myTable.add_row(["British Museum"])
myTable.add_row(["Buckingham Palace"])
myTable.add_row(["Victoria and Albert Museum"])
myTable.add_row(["The Shard"])
myTable.add_row(["Westminster Abbey"])
myTable.add_row(["The National Theatre"])
myTable.add_row([" Harrods"])
myTable.add_row(["London Transport Museum"])
myTable.add_row(["Houses of Parliament"])
myTable.add_row(["Hampton Court Palace"])
myTable.add_row(["Sherlock Holmes"])
myTable.add_row(["Trafalgar Square"])
myTable.add_row(["Covent Garden"])
myTable.add_row(["Kensington Palace"])
myTable.add_row(["The Mall"])
myTable.add_row(["Hampstead Heath"])
myTable.add_row(["Old-School Pubs"])
myTable.add_row([" Blue Plaques"])
myTable.add_row([" Churchill War Rooms"])
myTable.add_row(["Admiralty Arch"])
myTable.add_row(["Seven Dials"])
myTable.add_row(["Shakespeare’s Globe"])
print(myTable)
print("here are the famous london atrractions")
request=input(name+':')
if request=='Hi' or request=='hi':
print('Bot: Hello')
elif request=='Thanks' or request =='thanks':
print('Bot: No Problem!')
elif request=='Bye' or request =='bye':
print('Bot: Bye')
break
else:
response=bot.get_response(request)
print('Bot:',response)