pratikshahp commited on
Commit
b973d25
·
verified ·
1 Parent(s): 84c05ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -12,16 +12,15 @@ llm = HuggingFaceEndpoint(
12
  repo_id="mistralai/Mistral-7B-Instruct-v0.3",
13
  huggingfacehub_api_token=HF_TOKEN.strip(),
14
  temperature=0.7,
15
- max_new_tokens=150
16
  )
17
 
18
  # Recipe generation function
19
  def suggest_recipes(ingredients):
20
  # Create a prompt for the recipe generation
21
  prompt = (
22
- f"You are an expert in cooking. Please suggest 3 recipes using the following "
23
  f"ingredients: {ingredients}. Provide a title for each recipe, include "
24
- f"preparation time, and list step-by-step directions."
25
  )
26
  # Wrap the prompt in a HumanMessage object
27
 
 
12
  repo_id="mistralai/Mistral-7B-Instruct-v0.3",
13
  huggingfacehub_api_token=HF_TOKEN.strip(),
14
  temperature=0.7,
 
15
  )
16
 
17
  # Recipe generation function
18
  def suggest_recipes(ingredients):
19
  # Create a prompt for the recipe generation
20
  prompt = (
21
+ f"You are an expert in cooking. Please suggest 2 recipes using the following "
22
  f"ingredients: {ingredients}. Provide a title for each recipe, include "
23
+ f"preparation time, and list step-by-step directions do not include ingredients in response."
24
  )
25
  # Wrap the prompt in a HumanMessage object
26