Downloads · 30 days
39
5% of all-time downloads
auhide/chef-gpt-en
chef-gpt-en is a text generation model from auhide. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
Downloads · 30 days
39
5% of all-time downloads
All-time downloads
745
Public
Parameters
124M
996 MB on disk
Likes
0
Public
Click a slice to open those files.
.bin498 MB · 50%
From the Hugging Face model README
Test the model HERE.
Fine-tuned GPT-2 for recipe generation. This is the dataset that it's trained on.
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL_ID = "auhide/chef-gpt-en"
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
chef_gpt = AutoModelForCausalLM.from_pretrained(MODEL_ID)
ingredients = ", ".join([
"spaghetti",
"tomatoes",
"basel",
"salt",
"chicken",
])
prompt = f"ingredients>> {ingredients}; recipe>>"
tokens = chef_gpt.tokenizer(prompt, return_tensors="pt")
recipe = chef_gpt.generate(**tokens, max_length=124)
print(recipe)
Here is a sample result of the prompt:
ingredients>> spaghetti, tomatoes, basel, salt, chicken; recipe>>cook spaghetti according to package directions
meanwhile, place tomato slices and basel in a large pot with salted water and bring to a boil
reduce heat and