Food Price Prediction using Artificial Neural Network (ANN) and deployed using TensorFlow Serving.
Notebook: MamMates Food Price
Dataset: Food Price Dataset
Using MamMates Food Price, you can predict the price of the food based on its name, rating, and location.
- TensorFlow 2.14.0 or higher
- Docker 24.0.7 or higher
- scikit-learn 1.3.2 or higher
If you already have Docker installed, you only need to run the following command:
- Pull the image from Docker Hub:
docker pull putuwaw/mammates-food-price
- Run the image:
docker run -p 8503:8503 --name ml-price putuwaw/mammates-food-price
-
You can check that the model is already running by opening the browser and go to http://localhost:8503/v1/models/food_price
-
To do prediction, you can use the following command:
curl -s https://raw.githubusercontent.com/MamMates/ml-food-price/main/example.json | curl -X POST -d @- http://localhost:8503/v1/models/food_price:predict
- You will get the following response:
{
"predictions": [[13661.9189]]
}
If you want to develop this model, you can follow the steps below:
- Clone this repository:
git clone https://github.com/MamMates/ml-food-price.git
-
Update the model by changing the saved model in the model folder.
-
Build the Docker image:
docker build -t mammates-food-price .
- Run the image:
docker run -p 8503:8503 --name ml-price mammates-food-price
-
You can check that the model is already running by opening browser and go to http://localhost:8503/v1/models/food_price
-
To do prediction, you can use the following command:
curl -d @example.json -X POST http://localhost:8503/v1/models/food_price:predict
- To stop the container:
docker stop ml-price
Note
If you want to learn more about TensorFlow Serving, you can read the REST API documentation here.
This project is licensed under the MIT License. See the LICENSE file for details.