Downloads · 30 days
144
2% of all-time downloads
Ashikan/dut-recipe-generator
dut-recipe-generator is a text generation model from Ashikan. Use it when you need the model to write or continue text. The card lists the license as bigscience-bloom-rail-1.0.
Downloads · 30 days
144
2% of all-time downloads
All-time downloads
9.1K
Public
Parameters
559M
2.3 GB on disk
Likes
11
Public
Click a slice to open those files.
.safetensors2.2 GB · 99%
From the Hugging Face model README

This model is a fine-tuned version of bloom560m aimed at recipe generation for a given set of ingredients. Its focus is on the creation of healthier, diabetic-friendly recipes with the set of ingredients that someone has on hand.
This model further differentiates itself by prioritising common kitchen measurements (e.g. 1 cup, 1 teaspoon) and the metric system (e.g. 500g, 100ml) over US customary or imperial measurement systems.
During model training, unfamiliar recipes were tested by the Department of Food and Nutrition, with feedback incorporated to enhance the model's performance.

import json
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
tokenizer = AutoTokenizer.from_pretrained("Ashikan/dut-recipe-generator")
model = AutoModelForCausalLM.from_pretrained("Ashikan/dut-recipe-generator")
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
input_ingredients = ["mushrooms", "cabbage", "soy sauce", "sesame seeds", "honey"]
input_text = '{"prompt": ' + json.dumps(input_ingredients)
output = pipe(input_text, max_length=1024, temperature=0.2, do_sample=True, truncation=True)[0]["generated_text"]
#JSON formatted output with "title", "ingredients" and "method" nodes available
print(output)
You may test out the model on HuggingFace spaces here: https://huggingface.co/spaces/Ashikan/dut-recipe-generator
This model was first trained on a heavily filtered and processed version of the existing Recipe NLG dataset. Pre-processing involved the removal of invalid recipes, conversion of units such as degrees Fahrenheit to degrees Celsius and the filtering out of recipes completely written in US customary or imperial measurements.
After the initial training, the model was then trained on a new recipe dataset written by the Durban University of Technology. This dataset was tailored to feature healthier, diabetic-friendly recipes with a focus on ease of preparation and nutritional content. These recipes can be found within the Dut Diabetic Friendly Recipes dataset.
Prof Ashika Naicker*, Mr Shaylin Chetty, Ms Riashnie Thaver*, Ms. Anjellah Reddy*, Dr. Evonne Shanita Singh*, Dr. Imana Pal*, Dr. Lisebo Mothepu*.
*Durban University of Technology, Faculty of Applied Sciences, Department of Food and Nutrition, Durban, South Africa