This project uses AI to generate novel and plausible culinary recipes based on a user-provided list of ingredients.
A two-stage process:
-
Technique Prediction (Word2Vec):
- Analyzes input ingredients.
- Predicts suitable cooking techniques (e.g., bake, boil) based on learned semantic relationships from the dataset.
-
Recipe Generation (Fine-tuned GPT-2):
- Takes the original ingredients and the predicted techniques as input.
- A fine-tuned GPT-2 model, trained on a vast corpus of recipes, generates the complete recipe steps using special tokens (
[INGREDIENTS]
,[TECHNIQUES]
,[STEPS]
) for structured output.
Generated recipes are evaluated against real recipes by:
- Finding the most similar real recipes based on ingredient overlap (TF-IDF & Cosine Similarity).
- Comparing generated steps to benchmark steps using:
- ROUGE-L: Measures lexical overlap.
- BERT Similarity: Measures semantic similarity.
(Dataset: Based on Food.com recipes from Kaggle)