Performing Text Extraction also known as Question-Answering using BERT,and serving it Via REST API.
- More about BERT can be found here
- End to End NLP Text Extraction Probelm.
- The Kaggle dataset can be found Here Click Here
- My kaggle Notebook can be found here
- create a virtual environment and install requirements.txt
- After Setting up the environment go to backend/services/text_extraction/application/ai/training/ and run main.py and the training will start.
- After training is complete the weights of the model will be saved in weights directory, and this weights can be used for inference.
- Download the pre-trained weights from here and place it inside the weights folder(backend/services/text_extraction/application/ai/weights/trained_weights)
- After setting up the environment: go to backend/services/text_extraction/api and run app.py.
- After running the above step the server will start.
- You can send the POST request at this URL - localhost:8080/text_extraction/api/v1/predict (you can find the declaration of endpoint under backend/services/text_extraction/api/init.py )
- You can also see the logs under (backend/services/text_extraction/logs) directory.
- Request sample
- Response Sample