Spaces:
Runtime error
Runtime error
gamingflexer
commited on
Commit
·
a59c27e
1
Parent(s):
ca7de80
prompt added
Browse files- src/module/prompts/base.py +34 -0
src/module/prompts/base.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from textwrap import dedent
|
| 2 |
+
|
| 3 |
+
base_prompt = dedent("""
|
| 4 |
+
### Instruction:
|
| 5 |
+
product description starts here
|
| 6 |
+
|
| 7 |
+
{text}
|
| 8 |
+
|
| 9 |
+
product description ends here
|
| 10 |
+
|
| 11 |
+
this is the categorys list ['BEVERAGES', 'SNACKS & BRANDED FOODS', 'NOT FOUND', 'EGGS, MEAT & FISH', 'FOODGRAINS, OIL & MASALA', 'PERSONAL CARE', 'CLEANING & HOUSEHOLD', 'FRUITS & VEGETABLES', 'BAKERY, CAKES & DAIRY', 'MAKEUP', 'BABY CARE', 'PET FOOD & ACCESSORIES', 'NON FMCG', 'ALCOHOL & TOBACCO', 'WELLNESS', 'EVERYDAY MEDICINE-NEW', 'EXCERCISE & FITNESS', 'ALCOHOLIC BEVERAGES'].
|
| 12 |
+
|
| 13 |
+
Analyse data from the above product description to give me the following details in JSON format:
|
| 14 |
+
( return "NOT FOUND" where you don't have a answer)
|
| 15 |
+
{{
|
| 16 |
+
"brand": "sample_brand",
|
| 17 |
+
"mrp": "The price might start with MRP or Rs.",
|
| 18 |
+
"unit": "per pack",
|
| 19 |
+
"parent_category": "from the above given list",
|
| 20 |
+
"ingredients": ["ingredient1", "ingredient2", "ingredient3"],
|
| 21 |
+
"calorie_count": "Would be in numbers",
|
| 22 |
+
"marketed_by": "sample_marketer",
|
| 23 |
+
"manufactured_by": "sample_manufacturer",
|
| 24 |
+
"manufactured_in_country": "Country XYZ",
|
| 25 |
+
"type_of_packaging": "Box",
|
| 26 |
+
"promotion_on_the_pack": "if any",
|
| 27 |
+
"type_of_product": "give this your understanding",
|
| 28 |
+
"pack_of_or_no_of_units": "No. of Units"
|
| 29 |
+
}}
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
Analyse data from the above product description to give me the following details in JSON format:
|
| 33 |
+
Only return the output in the required json format.
|
| 34 |
+
""")
|