AdamCodd / t5-small-recipes-ingredients

huggingface.co
Total runs: 62
24-hour runs: 0
7-day runs: 9
30-day runs: 20
Model's Last Updated: January 11 2025
text-generation

Introduction of t5-small-recipes-ingredients

Model Details of t5-small-recipes-ingredients

t5-small-recipes-ingredients

This model t5-small has been finetuned on a curated recipe dataset.

It achieves the following results on the evaluation set:

  • Loss: 0.0453

The idea behind this is to generate a few recipe names to consider, based on ingredient inputs. I think it's useful when we have some leftover ingredients and don't know what to cook with them. Ingredients should be input in english with commas between them as shown in the example below.

The license is cc-by-nc-4.0 . For commercial use rights, please contact me ( [email protected] ).

Usage

The length of the negative prompt can be adjusted using the max_length parameter (50-60 is fine for recipe names). You can enhance the creativity of the outputs with the temperature setting (note: coherence may significantly degrade if the temperature exceeds 1.2). The parameters no_repeat_ngram_size and repetition_penalty can also be used to slightly improve coherence.

Use num_return_sequences to generate multiple recipes in a single pass (recommended).

from transformers import pipeline

# Initialize the recipe generation pipeline
recipe_generator = pipeline("text2text-generation", model="AdamCodd/t5-small-recipes-ingredients")

# Generate recipes
generated_texts = recipe_generator(
    "penne pasta, cherry tomatoes, basil, mozzarella cheese, olive oil",
    max_length=50,
    do_sample=True,
    temperature=1.0,
    no_repeat_ngram_size=2,
    repetition_penalty=1.2,
    num_return_sequences=5,
)

# Extract and print the generated recipes
for i, output in enumerate(generated_texts):
    print(f"Recipe {i+1}: {output['generated_text']}")

# Recipe 1: Pasta With Tomatoes And Basil
# Recipe 2: Pasta With Shredded Tomatoes And Mozzarella
# Recipe 3: Penne With Tomato And Basil
# Recipe 4: Penne Fagioli
# Recipe 5: Lemon-Basil Penne

This model has been trained on a not perfectly clean dataset, so the suggestions don't always make sense but it's a minor issue when returning multiple sequences at once. Still, improving the dataset will be the main focus for a future version.

Training and evaluation data

More information needed

Training procedure
Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 3e-05
  • train_batch_size: 32
  • eval_batch_size: 64
  • seed: 42
  • optimizer: AdamW with betas=(0.9,0.999) and epsilon=1e-08
  • Mixed precision
  • num_epochs: 3
  • weight_decay: 0.01
Framework versions
  • Transformers 4.36.2
  • Datasets 2.16.1
  • Tokenizers 0.15.0
  • Evaluate 0.4.1

If you want to support me, you can here .

Runs of AdamCodd t5-small-recipes-ingredients on huggingface.co

62
Total runs
0
24-hour runs
7
3-day runs
9
7-day runs
20
30-day runs

More Information About t5-small-recipes-ingredients huggingface.co Model

More t5-small-recipes-ingredients license Visit here:

https://choosealicense.com/licenses/cc-by-nc-4.0

t5-small-recipes-ingredients huggingface.co

t5-small-recipes-ingredients huggingface.co is an AI model on huggingface.co that provides t5-small-recipes-ingredients's model effect (), which can be used instantly with this AdamCodd t5-small-recipes-ingredients model. huggingface.co supports a free trial of the t5-small-recipes-ingredients model, and also provides paid use of the t5-small-recipes-ingredients. Support call t5-small-recipes-ingredients model through api, including Node.js, Python, http.

t5-small-recipes-ingredients huggingface.co Url

https://huggingface.co/AdamCodd/t5-small-recipes-ingredients

AdamCodd t5-small-recipes-ingredients online free

t5-small-recipes-ingredients huggingface.co is an online trial and call api platform, which integrates t5-small-recipes-ingredients's modeling effects, including api services, and provides a free online trial of t5-small-recipes-ingredients, you can try t5-small-recipes-ingredients online for free by clicking the link below.

AdamCodd t5-small-recipes-ingredients online free url in huggingface.co:

https://huggingface.co/AdamCodd/t5-small-recipes-ingredients

t5-small-recipes-ingredients install

t5-small-recipes-ingredients is an open source model from GitHub that offers a free installation service, and any user can find t5-small-recipes-ingredients on GitHub to install. At the same time, huggingface.co provides the effect of t5-small-recipes-ingredients install, users can directly use t5-small-recipes-ingredients installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

t5-small-recipes-ingredients install url in huggingface.co:

https://huggingface.co/AdamCodd/t5-small-recipes-ingredients

Url of t5-small-recipes-ingredients

t5-small-recipes-ingredients huggingface.co Url

Provider of t5-small-recipes-ingredients huggingface.co

AdamCodd
ORGANIZATIONS

Other API from AdamCodd