An example for a Deep Learning NLP model hosted as a RESTful API.
- Conda environment:
conda create -n nlp-ms python=3.8
- Dependencies:
- Run
pip install -r ./requirements.txt
to install all dependencies (except PyTorch) - API Stuff:
- 🤗Transformers is used as NLP library
- TensorFlow 2.0 or PyTorch
- I used Pytorch (see here for installation instructions)
- Run
To run the Text-Generation-API simply execute python src/service.py
in the root directory.
The script sample_request.py
can be used to issue requests to a running Text-Generation-API:
python sample_request.py <api-host-or-ip-adress>
.
Please refer to the folder tutorial.