pratikshahp commited on
Commit
4f13a6e
·
verified ·
1 Parent(s): bbd2b1f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -19,13 +19,11 @@ def suggest_recipes(ingredients):
19
  # Create a prompt for the recipe generation
20
  prompt = (
21
  f"You are an expert in cooking. Carefully review the provided ingredients: {ingredients}. "
22
- f"If any ingredient is invalid (e.g., non-food items, questions or any random words ), "
23
- f"respond only with a two-line polite apology for not being able to process the request & Please do not provide any recipes, alternative suggestions, or outputs in such cases. "
24
  f"If all ingredients are valid, suggest 2 recipes using them. Provide a title, preparation time, and step-by-step directions. "
25
  f"Do not include the ingredients list in the recipes."
26
  )
27
 
28
-
29
 
30
  # Use the HuggingFaceEndpoint model to generate a response
31
  response = llm(prompt)
 
19
  # Create a prompt for the recipe generation
20
  prompt = (
21
  f"You are an expert in cooking. Carefully review the provided ingredients: {ingredients}. "
22
+ f"If any ingredient is invalid (e.g., non-food items, questions or any random words ), respond only with a two-line polite apology for not being able to process the request & Please do not provide any recipes, alternative suggestions, or outputs in such cases. "
 
23
  f"If all ingredients are valid, suggest 2 recipes using them. Provide a title, preparation time, and step-by-step directions. "
24
  f"Do not include the ingredients list in the recipes."
25
  )
26
 
 
27
 
28
  # Use the HuggingFaceEndpoint model to generate a response
29
  response = llm(prompt)