This app uses docker
and docker-compose
.
- Clone this repository with
git clone https://github.com/rochimfn/question-answering-konstitusi.git
. - Enter the app directory with
cd question-answering-konstitusi
, - Create
.env
file withtouch .env
(*nix) orni .env
(windows powershell). - Fill the
.env
with your Telegram bot token. Example:BOT_TOKEN=xxx:xxxxxx
. - Build the image with
docker-compose build
. - Start the container with
docker-compose up -d
. - The HTTP API is served at port 8000 and the bot will be started soon (try /start command in your bot room).
This app is developed in python version 3.8. Make sure you have it installed.
- Clone this repository with
git clone https://github.com/rochimfn/question-answering-konstitusi.git
. - Enter the app directory with
cd question-answering-konstitusi
, - Create a virtual environment for python dependencies with
python -m venv venv
orpython -m virtualenv venv
. - Enter the virtual environment with
source venv/bin/activate
(*nix) orvenv/Scripts/activate
(windows). - Install all the dependencies with
pip install -r requirements.txt
. - Install the local share component with
pip install -e .
. - Set the required environment variables
BOT_TOKEN
,ENABLE_PROOFING
,NUM_RANK
,QA_HOST
, andQA_PORT
. Please refer to your operating system documentation on how to set environment variables. - Start the training with
python console/train.py
(Required). - You can start the streamlit page with
streamlit run main.py
(Optional). - You can start the HTTP API with
python web.py
(Optional). - You can start the bot with
python bot.py
(Optional). Make sure to start the HTTP API first.