- python 3.9 and pip
- tensorflow
- tensorflow_hub
- tensorflow-text
- (See details in "How to Run the Project" about installing other dependencies)
- Haystack (see installation instructions)
- Apple M1 has extra dependencies
- Elasticsearch host (see details in "Miscellaneous" about elasticsearch)
- Docker
- Elasticsearch host (see details in "Miscellaneous" about elasticsearch)
- Change directory to
src/server
- Run shell script
run.sh
to prepare and store in your elasticsearch host the information of- i) question and answer (Q&A) pairs,
- ii) algorithm general knowledge base and
- iii) syllabus knowledge base.
- Install
pipenv
bypip install pipenv
- Run
pipenv install
to install backend dependencies listed in the Pipfile.lock - Run
python -m src.api.app
to start the Flask API, which then initiates the NLP pipeline
- Change directory to
src/server
- Run shell script
prod.sh
to build an image of the API and the NLP pipeline. Then, the backend will be running in a docker container. It has been tested that in Linux x86 system the docker image can be successfully built. - It is suggested that backend server should have a GPU for faster inferencing time.
Precision = 1.00
Recall = 0.83
F1 = 0.91
Confusion Matrix:
- In Fall 2022, the backend is hosted on the Google Cloud Platform. We utilized a Nvidia Tesla P100 (225W, 16G RAM) and 2 vCPU with 7.5G RAM. This results in 5s response time for each request on average.
- A elasticsearch host should be running locally or on the cloud. We used to have a free-trial cloud elasticsearch host provided by elastic.co. Alternatively, elasticsearch instance can also be hosted in a docker container.