tonyliu404 commited on
Commit
c4307f8
·
verified ·
1 Parent(s): 9a3541b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -139,7 +139,7 @@ Use the provided context to generate a result based on the following JSON format
139
  Instructions:
140
  1. Focus on the user's specific request and avoid irrelevant ingredients or approaches.
141
  2. Do not return anything other than the JSON.
142
- 3. If the answer is unclear or the context does not fully address the prompt, return []
143
  4. Base the response on simple, healthy, and accessible ingredients and techniques.
144
  5. Rewrite the description in third person
145
 
@@ -147,6 +147,7 @@ Context: {context}
147
 
148
  When choosing a recipe from the context, FOLLOW these instructions:
149
  1. The recipe should be makeable from scratch, using only proper ingredients and not other dishes or pre-made recipes
 
150
 
151
  Question: {question}
152
  """
@@ -336,7 +337,8 @@ if uploaded_image and query:
336
  {fpredictions}
337
  And the following user request:
338
  {query}
339
- Return to me JUST ONE of the classified images that most relates to the user request, based on the relevance of the user query.
 
340
  in the format: [dish]
341
  """
342
  ),
 
139
  Instructions:
140
  1. Focus on the user's specific request and avoid irrelevant ingredients or approaches.
141
  2. Do not return anything other than the JSON.
142
+ 3. If the answer is unclear or the context does not fully address the prompt, return [].
143
  4. Base the response on simple, healthy, and accessible ingredients and techniques.
144
  5. Rewrite the description in third person
145
 
 
147
 
148
  When choosing a recipe from the context, FOLLOW these instructions:
149
  1. The recipe should be makeable from scratch, using only proper ingredients and not other dishes or pre-made recipes
150
+ 2. If the recipes from the context do not match {question}, generate an amazing recipe for {question} following the above template.
151
 
152
  Question: {question}
153
  """
 
337
  {fpredictions}
338
  And the following user request:
339
  {query}
340
+ Return to me JUST ONE of the classified images that most relates to the user request, based on the relevance of the user query.
341
+ If the predictions and the user query do not correlate, return the most likely dish focusing on the user query.
342
  in the format: [dish]
343
  """
344
  ),