How to build your own chatbot
We start by creating a file that we will use to download the model. To help us, we use Huggingface, a python library that provides various high quality NLP models. Then we create a python class that we will use to handle the logic from converting our english text to create our word tokens that we will use as inputs for our model. We then build a Flask API with two endpoints, one for checking if the service is working and one for integrating with our chatbot. Finally we generate a Dockerfile that when being built will pre-download the chat model so that when we send request to our API it can make quick responses, instead of reloading the model every single time.
May-11-2021, 18:30:20 GMT
- Technology: