- Set
KAGGLE_USERNAMEandKAGGLE_KEYenvironment variables with your Kaggle credentials - Set
FOOD_API_ID,FOOD_API_SECRET,RECIPES_API_IDandRECIPES_API_SECRETenvironment variables with your Edamam API credentials - Download food-101 images datasets from kaggle using
mount_food_101.pyscript
- Create a virtualenv:
python -m venv venv && source venv/bin/activate- install requirements:
pip install -r requirements.txtNote: app requires python version>=3.11 (according to vermin)
- run genie in CLI mode:
python genie_driver.py --cli-mode- run genie in API mode:
python genie_driver.py --api-mode- train a new genie CNN model with specific number of food types (default=101):
python genie_driver.py --new-genie --num-types=<number of supported food types>- train a new genie CNN model with GPU adaptation:
python genie_driver.py --new-genie --gpu- Create
secrets.envfile with Kaggle and Edamam API credentials - Build a new image tag locally:
docker build -t genie-io:<image_tag> .- Run app in a container (API mode by default):
docker run -it -p 5000:5000 genie-io:<image_tag>