Chatbot for handling emergency calls
- Introduction
- Requirements
- Configuration
- Name: HappyCall
- Authors:
Daniel Casado Faulí
Josep Roig Torres
Joan Carrión Anaya
- Version: 1.0
- IDE: Visual Studio Code
In order to run this project you need to install the following:
-
Python:
- URL: 'https://www.python.org/downloads/'
- PROJECT VERSION: 3.8.2
-
pip (Package installer for Python):
- URL: 'https://pip.pypa.io/en/stable/installing/'
- PROJECT VERSION: 20.0.2
NOTE pip is already installed if you are using Python 2 >=2.7.9 or Python 3 >=3.4 downloaded from python.org or if you are working in a Virtual Environment created by virtualenv or pyvenv. Just make sure to upgrade pip.
-
Django (Python Web framework):
- PROJECT VERSION: 3.0.5
python -m pip install Django
python -m django --version
-
MongoDB (non-relational database):
-
Docker (Software container):
-
Redis (Need docker image):
docker run --name some-redis -d redis
In order to run the server do the following:
-
We will be working in a virtual environment, so in case you don't have installed venv or virtualenv, do:
(Mac OS / Linux) python3 -m pip install --user virtualenv
(Windows) python -m pip install --user virtualenv
-
Once installed, introduce the following commands:
>> virtualenv env >> (Mac OS / Linux) source env/bin/activate (Windows) env\Scripts\activate
-
Whenever you want to leave the virtual environment do:
>> deactivate
-
Many libraries have been used, in order to have them do the following:
pip install -r requirements.txt
Some errors have been found & fixed during the import, but will appear everytime the project is cloned: To avoid them do the following:
- Copy all content from asyncriorector_fix.py
(Windows) CTRL+A CTRL+C
- Go to env/Lib/twisted/internet/asyncriorector.py and change it with the copy.
(Windows) CTRL+A CTRL+V
- Copy all content from asyncriorector_fix.py
-
Because we are using MongoDB to store some information, the following commands need to be done:
In the command line, locate yourself in the /src folder:>> cd src >> python manage.py makemigrations >> python manage.py migrate
-
Before running the server, we first need to bind Redis to Local port for messaging purpose
>> docker run -p 6379:6379 -d redis:5
-
Reached this point, everything should be fine to run the server (Default port: 8000)
>> python manage.py runserver
OR you want to have it in any other port:
python manage.py runserver <server_port>
-
Finally, to access the ui: