Download examples/quickstart.py from Shakiran/MzeeChakulaNutritionEnsembleModel: direct link, hf CLI and curl.
- Browser
- Download file 384 Bytes
-
https://huggingface.co/Shakiran/MzeeChakulaNutritionEnsembleModel/resolve/main/examples/quickstart.py
- Command line
-
hf download hf://Shakiran/MzeeChakulaNutritionEnsembleModel/examples/quickstart.py
-
curl -L -o quickstart.py https://huggingface.co/Shakiran/MzeeChakulaNutritionEnsembleModel/resolve/main/examples/quickstart.py
384 Bytes
| from nutrition_ensemble import NutritionEnsemble | |
| # Initialize model | |
| ensemble = NutritionEnsemble(".") | |
| # Example 1: Basic recommendations | |
| print("=== Basic Recommendations ===") | |
| recs = ensemble.recommend(user_id=0, top_k=5) | |
| print(recs) | |
| # Example 2: With exclusions | |
| print("\n=== With Exclusions ===") | |
| recs = ensemble.recommend(user_id=0, top_k=5, exclude_foods=[1, 2, 3]) | |
| print(recs) | |