Docker-Example
How to use
you can read complete explaintion on this Blog Link
Make a POST request to the /convert endpoint with a JSON object containing the input_str key and the string you want to convert as its value. The API will return a JSON object containing the output_list key and a list of the individual words in the input string.
Here's an example request:
curl --location --request POST 'http://localhost:5000/convert' \ --header 'Content-Type: application/json' \ --data-raw '{ "input_str": "Hello World" }'
And the corresponding response:
{ "output_list": [ "Hello", "World" ] }
Building and running the Docker image
To build Docker
docker build -t myflaskapp .
To run Docker
docker run -p 5000:5000 myflaskapp