This is an example Django app that shows how to create a simple chat bot web app using Django and ChatterBot.
Start the Django app by running
python manage.py runserver 0.0.0.0:8000Further documentation on getting set up with Django and ChatterBot can be found in the ChatterBot documentation
python manage.py migratepython manage.py trainThe chatterbot corpus path can be found here.
You could found Bot settings here
CHATTERBOT = {
'name': 'Chatterbot Live Example',
'logic_adapters': [
'chatterbot.logic.MathematicalEvaluation',
'chatterbot.logic.TimeLogicAdapter',
'chatterbot.logic.BestMatch'
],
'trainer': 'chatterbot.trainers.ChatterBotCorpusTrainer',
'training_data': [
'chatterbot.corpus.english'
]
}Here some of the steps lauch your Django app with Heroku
pip install -r requirements.txt
Downloading/unpacking ...
...
Successfully installed Django dj-database-url dj-static django-toolbelt gunicorn psycopg2 static3
Cleaning up...heroku local web
11:48:19 web.1 | started with pid 36084
11:48:19 web.1 | 2014-07-17 11:48:19 [36084] [INFO] Starting gunicorn 19.0.0
11:48:19 web.1 | 2014-07-17 11:48:19 [36084] [INFO] Listening at: http://0.0.0.0:5000 (36084)
11:48:19 web.1 | 2014-07-17 11:48:19 [36084] [INFO] Using worker: sync
11:48:19 web.1 | 2014-07-17 11:48:19 [36087] [INFO] Booting worker with pid: 36087Your app should now be running on http://localhost:5000/.
git add .
git commit -m "Added a Procfile."
heroku login
Enter your Heroku credentials.
...
heroku create
Creating intense-falls-9163... done, stack is cedar
http://intense-falls-9163.herokuapp.com/ | git@heroku.com:intense-falls-9163.git
Git remote heroku added
git push heroku master
...
-----> Python app detected
...
-----> Launching... done, v7
https://intense-falls-9163.herokuapp.com/ deployed to HerokuA more detailed information ca be found here https://devcenter.heroku.com/articles/deploying-python
ChatterBot Django Live Example is licensed under BSD 3-clause