This repo contains NER model implementation for Conll2003 dataset using a transformer-based model for predicting person, organization etc from the input text, For Inferenceing Part Fast API is used.
Install Required packages by executing the below command
pip install -r requirements.txt
Run the Training Notebook provided, if you don't have a local resource, it's suggested to run either in Colab or Kaggle.
Run training-notebook.ipynb
After a successful run, the output contains the fine-tuned model along with JSON config file and tokenizer files.
The fine-tuned model and JSON config file should be placed in the artifacts folder(by default it keeps in the artifacts folder). And tokenizer-related files should be placed in the tokenizer folder.
Start the server by executing the below command.
sh start_server.sh
Go to localhost:8001/docs, you should be able to see the Swagger UI. Where you can test the API.
- BERT Base Model is used for NER.
- FastAPI is used for Inferencing.
- Hugging Face Library is used.
- Supports Electra Model without any code changes.
- Dataset will get downloaded automatically using Hugging Face library.
MIT