Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -342,9 +342,24 @@ if uploaded_image and recipe_submit:
|
|
| 342 |
{fpredictions}
|
| 343 |
And the following user request:
|
| 344 |
{query}
|
| 345 |
-
|
| 346 |
-
If the
|
| 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 |
]
|