pratikshahp commited on
Commit
b4fd20a
·
verified ·
1 Parent(s): 1c82651

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,8 +7,8 @@ from transformers import pipeline
7
  model = pipeline("text2text-generation", model="flax-community/t5-recipe-generation")
8
  # Recipe generation function
9
  def suggest_recipes(ingredients):
10
- prompt = f"Suggest some recipes using the following ingredients: {ingredients}. Include preparation time for each recipe."
11
- response = model(prompt, max_length=500, num_return_sequences=3)
12
 
13
  # Parse model output into a readable format
14
  recipes = []
 
7
  model = pipeline("text2text-generation", model="flax-community/t5-recipe-generation")
8
  # Recipe generation function
9
  def suggest_recipes(ingredients):
10
+ prompt = f" You are expert in cooking. Please suggest 3 recipes using the following ingredients: {ingredients}. Give the title to each recipe. Include preparation time for each recipe at the beginning."
11
+ response = model(prompt)
12
 
13
  # Parse model output into a readable format
14
  recipes = []