tonyliu404 commited on
Commit
8f02d73
·
verified ·
1 Parent(s): ec553ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -2
app.py CHANGED
@@ -342,9 +342,24 @@ if uploaded_image and recipe_submit:
342
  {fpredictions}
343
  And the following user request:
344
  {query}
345
- Return to me JUST ONE of the classified images that most relates to the user request.
346
- If the predictions and the user query do not correlate, return the most likely dish focusing on the user query.
347
  in the format: [dish]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
348
  """
349
  ),
350
  ]
 
342
  {fpredictions}
343
  And the following user request:
344
  {query}
345
+ 1. If the user's query relates to any of the classified predictions (even partially or conceptually), select the most relevant dish from the predictions.
346
+ 2. If the query does not align with the predictions, disregard them and suggest a dish that best matches the user's query.
347
  in the format: [dish]
348
+
349
+ Example 1:
350
+ Predictions: apple pie: 50%, cherry tart: 30%, vanilla ice cream: 20%
351
+ User query: pumpkin
352
+ Response: [pumpkin pie]
353
+
354
+ Example 2:
355
+ Predictions: spaghetti: 60%, lasagna: 30%, salad: 10%
356
+ User query: pasta with layers
357
+ Response: [lasagna]
358
+
359
+ Example 3:
360
+ Predictions: sushi: 70%, sashimi: 20%, ramen: 10%
361
+ User query: noodles
362
+ Response: [ramen]
363
  """
364
  ),
365
  ]