Am trying to create a simple chatbot using python but anytime i run it i have internal server error. Below is the code. Could anyone help?
from flask import Flask, render_template, request
from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer
app = Flask(__name__)
englich_bot = ChatBot("Chatterbot", storage_adapter="chatterbot.storage.SQLStorageAdapter")
trainer = ChatterBotCorpusTrainer(englich_bot)
trainer.train("chatterbot.corpus.english")
@app.route("/")
def home():
return render_template('abcpage.html')
@app.route("/get")
def get_bot_response():
userText = request.args.get('msg')
return str(englich_bot.get_response(userText))
if __name__ == '__main__':
app.run()