Skip to content

MamMates/ml-food-recommendation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6a3e32b Β· Dec 20, 2023

History

16 Commits
Dec 18, 2023
Dec 18, 2023
Dec 18, 2023
Dec 18, 2023
Dec 18, 2023
Dec 18, 2023
Dec 18, 2023
Dec 20, 2023
Dec 20, 2023

Repository files navigation

ml-food-recommendation

TensorFlow Docker Google Colab LICENSE Docker Version Docker Pulls

Food Recommendation System using TensorFlow Recommenders (TFRS) and deployed using TensorFlow Serving.

Notebook: MamMates Food Recommendation

Dataset: Food Recommendation Dataset (Dummy)

Features πŸ’‘

Using MamMates Food Recommendation, you can get food recommendation based on the given id_user.

Prerequisites πŸ“‹

Usage ✨

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-recommendation
  • Run the image:
docker run -p 8504:8504 --name ml-rec putuwaw/mammates-food-recommendation
curl -s https://raw.githubusercontent.com/MamMates/ml-food-recommendation/main/example.json | curl -X POST -d @- http://localhost:8504/v1/models/food_rec:predict
  • You will get the following response:
{
  "predictions": [
    {
      "output_1": [
        1.59945917, 1.14119792, 0.741919041, 0.635785818, 0.532811046,
        0.467606097, 0.457192838, 0.0975963473, 0.017279733, -0.0865440145
      ],
      "output_2": ["13", "14", "12", "2", "18", "20", "11", "10", "7", "9"]
    }
  ]
}

Development πŸ’»

If you want to develop this model, you can follow the steps below:

  • Clone this repository:
git clone https://github.com/MamMates/ml-food-recommendation.git
  • Update the model by changing the saved model in the model folder.

  • Build the Docker image:

docker build -t mammates-food-recommendation .
  • Run the image:
docker run -p 8504:8504 --name ml-rec mammates-food-recommendation
curl -d @example.json -X POST http://localhost:8504/v1/models/food_rec:predict
  • To stop the container:
docker stop ml-rec

Note

If you want to learn more about TensorFlow Serving, you can read the REST API documentation here.

License πŸ“

This project is licensed under the MIT License. See the LICENSE file for details.