QA-engine is a question-answering service that wraps multiple QA models.
Python 3
Python 2.7 (qa-bert dependency)
Clone the repository with
git clone https://github.com/TrentoCrowdAI/qa-engine/
virtualenv -p python3 venv3.7
First of all create your config.json file. Reference: TODO:link Copy and paste the config.example.json in the root of the project.
cp config.example.json config.json
You can choose to configure the project automatically or manually, as you want.
Start the script "service_start.sh" with:
bash service_start.sh
All the requirements will be downloaded and installed. If all goes well, the service API service is started on port 80.
If you want to have full control on the preparation of the environment you have to follow these steps:
- Enter in the python virtual environment
source venv3.7/bin/activate
- Download python dependencies
pip install -r requirements_python2.txt
pip3 install -r requirements_python3.txt
- Download QA-models resources
bash prepare_environment.sh
For testing purposes you can launch:
python3 app.py
The API service will listen on port 5000.
Otherwise, in production environment you can run the service in background with:
bash service_start.sh
The API service will listen on port 80.