Spaces:
Sleeping
Sleeping
Commit
·
3fdba15
1
Parent(s):
9bb2fc2
improve the prompts
Browse files- app/core/prompts.py +4 -4
app/core/prompts.py
CHANGED
@@ -3,17 +3,17 @@ from typing import Optional
|
|
3 |
|
4 |
from pydantic_settings import BaseSettings
|
5 |
|
6 |
-
EXTRACT_INFO_SYSTEM = "You are an expert
|
7 |
|
8 |
EXTRACT_INFO_HUMAN = (
|
9 |
-
"""Output properties of the {product_taxonomy} product in the images. You should use the following
|
10 |
|
11 |
{product_data}
|
12 |
|
13 |
-
If an attribute
|
14 |
).replace(" ", "")
|
15 |
|
16 |
-
FOLLOW_SCHEMA_SYSTEM = "You are an expert
|
17 |
|
18 |
FOLLOW_SCHEMA_HUMAN = """Convert following attributes to structured schema. Keep all the keys and number of values. Only replace the values themselves. :
|
19 |
|
|
|
3 |
|
4 |
from pydantic_settings import BaseSettings
|
5 |
|
6 |
+
EXTRACT_INFO_SYSTEM = "You are an expert in structured data extraction. You will be given an image or a set of images of a product and should extract its properties into the given structure."
|
7 |
|
8 |
EXTRACT_INFO_HUMAN = (
|
9 |
+
"""Output properties of the {product_taxonomy} product shown in the images. You should use the following product data to assist you, if available:
|
10 |
|
11 |
{product_data}
|
12 |
|
13 |
+
If an attribute appears in both the image and the product data, use the value from the product data."""
|
14 |
).replace(" ", "")
|
15 |
|
16 |
+
FOLLOW_SCHEMA_SYSTEM = "You are an expert in structured data extraction. You will be given an dictionary of attributes of a product and should output the its properties into the given structure."
|
17 |
|
18 |
FOLLOW_SCHEMA_HUMAN = """Convert following attributes to structured schema. Keep all the keys and number of values. Only replace the values themselves. :
|
19 |
|