Open intercontoni opened 3 years ago
Hi... the chatterbot not answer...
I uses this...
Chatterbot 1.0.8 Flask 1.1.2
The app
`from flask import Flask, render_template, request from chatterbot import ChatBot from chatterbot.trainers import ChatterBotCorpusTrainer
app = Flask(name, template_folder="templates")
chatbot = ChatBot('Toni')
Create a new trainer for the chatbot trainer = ChatterBotCorpusTrainer(chatbot)
Train the chatbot based on the english corpus trainer.train("chatterbot.corpus.english")
Train the chatbot based on the spanish corpus trainer.train("chatterbot.corpus.spanish")
@app.route('/') def home(): return render_template('home.html')
@app.route("/get") def get_bot_response(): userText = request.args.get('msg') return str(bot.get_response(userText))
if name == "main": from waitress import serve serve(app, host="0.0.0.0", port=8080) (I don't know if waitress is ok... I am músican no programer)
The html is there ``
``
Hi! Nice to meet you!
Thanks for help me.
Hi... the chatterbot not answer...
I uses this...
Chatterbot 1.0.8 Flask 1.1.2
The app
`from flask import Flask, render_template, request from chatterbot import ChatBot from chatterbot.trainers import ChatterBotCorpusTrainer
app = Flask(name, template_folder="templates")
chatbot = ChatBot('Toni')
Create a new trainer for the chatbot trainer = ChatterBotCorpusTrainer(chatbot)
Train the chatbot based on the english corpus trainer.train("chatterbot.corpus.english")
Train the chatbot based on the spanish corpus trainer.train("chatterbot.corpus.spanish")
@app.route('/') def home(): return render_template('home.html')
@app.route("/get") def get_bot_response(): userText = request.args.get('msg') return str(bot.get_response(userText))
if name == "main": from waitress import serve serve(app, host="0.0.0.0", port=8080)
(I don't know if waitress is ok... I am músican no programer)
The html is there ``
``
Welcome to my ChatBot
Hello! My name is Bob. Your personal chatbot!
Hi! Nice to meet you!
``
Thanks for help me.