As the dataset is too big to be shared on GitHub, you must download it on OpenFoodFacts (products.csv: 4Go).
python -m venv dev
source dev/Scripts/activate
pip install -r requirements.txt
docker build --tag app:1.0 .
docker run --publish 8501:8501 -it app:1.0 -m streamlit run src/app.py
Then access http://localhost:8501.
docker run --publish 8501:8501 -it app:1.0 src/api.py
Then access http://localhost:8501
Everytime you update the project, you must build a new image with a new tag.
- Download the RAW data on OpenFoodFacts ;
- Execute
notebooks/eda.ipynb
notebook to clean the data ; - Execute
notebooks/feature_encoding_and_selection.ipynb
notebook to transform the data ; - Execute
src/create_folds.py
to prepare data for training ; - Execute
src/train.py
to train the model ;
python src/report.py --fold=1
fold value is in range [0,4]
streamlit run src/app.py
python src/api.py
python -m isort src/
python -m black src/
python -m flake8 src/ --count --statistics
This project is provided under the MIT license.