This project contains a containerized Python microservice that provides NLP functionality, including Named Entity Recognition (NER) and Sentiment Analysis, and is prepared for deployment on AWS using Docker and Elastic Container Registry (ECR) / Elastic Container Service (ECS).
- NER Endpoint: Extract entities from input text
- Sentiment Endpoint: Analyze text sentiment
- Built with Flask, PyTorch, Transformers
- Fully containerized with Docker
- Ready for cloud deployment on AWS
- Docker ≥ 20.x
- Python 3.12 (for local development)
- Optional: AWS CLI (for ECR/ECS deployment)
- Build docker image
docker build -t containerized-microservice:latest .- Run docker image
docker run -it -p 5000:5000 containerized-microservice:latest- Test the Endpoints (NER & Sentiment)
curl -X POST http://localhost:5000/ner -H 'Content-Type: application/json' -d '{"text": "Meta is a tech giant"}'curl -X POST http://localhost:5000/sentiment -H 'Content-Type: application/json' -d '{"text": "I love mathematics"}'