Spaces:
Sleeping
Sleeping
| EXTRACT_INFO_HUMAN_MESSAGE = \ | |
| "Output properties of the product in the image." | |
| EXTRACT_INFO_SYSTEM_MESSAGE = \ | |
| "You are an expert at structured data extraction. You will be given an image of a product and should output the its properties into the given structure." | |
| FOLLOW_SCHEMA_HUMAN_MESSAGE = \ | |
| """Convert following attributes to structured schema. Keep all the keys and number of values. Only replace the values themselves. : | |
| {json_info}""" | |
| FOLLOW_SCHEMA_SYSTEM_MESSAGE = \ | |
| "You are an expert at structured data extraction. You will be given an dictionary of attributes of a product and should output the its properties into the given structure." | |
| if __name__ == '__main__': | |
| print('Run test cases...') | |
| print(FOLLOW_SCHEMA_HUMAN_MESSAGE.format(json_info='{"color": "red"}')) | |
| print(FOLLOW_SCHEMA_HUMAN_MESSAGE.format(json_info='{"color": "red", "size": "small"}')) | |
| print(FOLLOW_SCHEMA_HUMAN_MESSAGE.format(json_info='{"color": "red", "size": "small", "material": "cotton"}')) | |