Skip to content

AmsterdamSMARTBOT/AmsterdamSmartBot

Repository files navigation

Smart BOT

This chatbot has been developed to be used in Amsterdam smart city environment. It is based on an interactive conversation with the user. The specialization is for searching parking and electric charge points in AMSTERDAM.

An example of typical input would be something like this:

user: Good morning! How are you doing?

smartBOT: Hello and how are you this morning? I'm doing great, how about you?

user: I'm fine aswell

smartBOT: Glad to hear it

user: Can you find me the closest parking in Amsterdam?

smartBOT: Yes, I was created to search parkings in Amsterdam

smartBOT: Would you mind shering your location to search the closest parking? ...

How it works

The iteration with the chatbot is possible thanks to AIML, Artificial Inteligence Markup Language, an XML dialect for creating natural language. Through different keywords the service is able to understand and recommend the parking locations asked from the user.

Installation

Python version required: 3.5.2

Pypi is suggested to install libraries for the virtual environment

PostgreSQL version recommended: 9.5.6

Heroku version required: Cedar-14 (if you want to migrate in a heroku platform)

Local Installation

First of all, initialize the local virtual environment:

pip install virtualenv
virtualenv venv
venv\Scripts\activate

Install all the required libraries through this command:

pip install -r requirements.txt

Database settings:

Execute these commands to create tables and relations into local database

python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser

Run chatbot script:

python main.py

Run web application:

python manage.py runserver 0.0.0.0:8000

Heroku Installation

heroku login
heroku create <nameAPP>
heroku config:set DISABLE_COLLECTSTATIC=1
heroku config:set BUILD_WITH_GEO_LIBRARIES=1
git push heroku master
heroku config:set DISABLE_COLLECTSTATIC=0 

Downgrade from HEROKU-16 to CEDAR-14 (GDAL library not supported on Heroku-16):

heroku stack:set cedar-14 
git push heroku master

Database settings:

First of all, is needed to update database's informations from Heroku Dashboard into the settings.py file. In settings.py modify the dictionary DATABASES with the new informations (Engine, Host, User, Name, Password, Port)

Execute these commands to create tables and relations into heroku database:

heroku run python manage.py makemigrations
heroku run python manage.py migrate
heroku run python manage.py createsuperuser

Training data

The training data used by the engine is contained in "standard" folder. At the moment, English training data is in this module.

This is the link to the web page where you can find an explanation about SmartBOT http://amsterdamsmartbot.herokuapp.com/

Examples

Package Version Package Version Package Version Package Version

Technologies

About

TU Delft Traineeship Giovinazzo Rocco - Lamorte Gerardo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published