Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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"
|
11 |
-
response = model(prompt
|
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 = []
|