This is an end-to-end NLP project to summarize text.
Sure, here is the README file in a text file: This project is a text summarizer using natural language processing (NLP) and the Hugging Face Transformers library. It is deployed using a Docker container and FastAPI.
- Python 3.7+
- Docker
- FastAPI
-
Clone the project repository: git clone https://github.com/pratikbarjatya/text-summerizer-project.git
-
Install the project dependencies:
cd text-summarizer-projectpip install -r requirements.txt -
Build the Docker image:
docker build -t text-summarizer . -
Run the Docker container:
docker run -p 8000:8000 text-summarizer
To summarize a text, send a POST request to the /summarize endpoint with the following JSON body:
{
"text": "The text to be summarized."
}The API will return a JSON response with the following fields:
{
"summary": "The summarized text."
}import requests
response = requests.post(
"http://localhost:8000/summarize",
json={"text": "This is the text to be summarized."}
)
summary = response.json()["summary"]
print(summary)This is the summarized text.
To deploy the project to production, you can use the following steps:
-
Build the Docker image:
docker build -t text-summarizer . -
Push the Docker image to a Docker registry:
docker push <docker-registry>/text-summarizer -
Deploy the Docker image to a production environment:
docker run -d -p 80:80 <docker-registry>/text-summarizer
Once the project is deployed, you can access the API at the following URL:
http://<host-address>:80/summarize
If you would like to contribute to this project, please feel free to open a pull request.
This project is licensed under the MIT License.
End-to-end Text-Summarizer-Project
- Update
config.yaml - Update
params.yaml - Update entity
- Update the configuration manager in the src config
- update the components
- update the pipeline
- update the main.py
- update the app.py