Views
No views yet
1import mlx.core as mx
2from mlx_lm import load, generate
3
4# Load model
5model, tokenizer = load("YOUR_USERNAME/gutsync_food_analysis_llama-3.2-3B")
6
7# Generate
8prompt = '''### Instruction:
9Parse the following food description and extract structured data.
10
11### Input:
12chicken salad with ranch dressing
13
14### Output:
15'''
16
17response = generate(model, tokenizer, prompt=prompt, max_tokens=256)
18print(response)1{
2 "ingredients": ["chicken", "lettuce", "ranch dressing"],
3 "categories": ["protein", "vegetables", "fats"],
4 "is_beverage": false,
5 "contains_dairy": true,
6 "estimated_calories": 450
7}1@misc{gutsignal-food-parser,
2 author = {Your Name},
3 title = {GutSignal Food Parsing Model},
4 year = {2026},
5 publisher = {Hugging Face},
6 howpublished = {\url{https://huggingface.co/YOUR_USERNAME/gutsync_food_analysis_llama-3.2-3B}}
7}