Add FastAPI Server for API Usage + Fix Docker Errors (AWS Install Loop, NLTK Import) #303
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This PR includes two separate but related updates focused on improving Docker-based usage and enabling the project to run as a microservice:
🚀 1. Added FastAPI Server for API Usage
Introduced a FastAPI-based server to expose functionality via a REST API.
This makes it easier to run the project as a microservice inside Docker or other environments.
Designed for convenience when integrating with other services or tools.
🐛 2. Docker Error Fixes
Resolved two errors that occurred when building/running the Docker container:
Infinite Loop: AWS Requirements Installation
The Docker build got stuck repeatedly trying to install AWS-specific Python packages.
Fixed by updating the python base image for proper dependency installation.
NLTK Import Error
The container failed on startup due to NLTK missing required data or improper initialization.
Fixed by ensuring required NLTK resources are downloaded during image build and handling import gracefully.