tunght commited on
Commit
4f541b2
·
1 Parent(s): 74d4b47

add garment type

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -84,8 +84,8 @@ def detect_features(image_paths, garment_type):
84
  "content": [
85
  {
86
  "type": "text",
87
- "text": """Describe the features of the {garment_type} in the photos in less than 100 words.
88
- What is the intended use of the {garment_type} in this image, use at most 5 words for intended use?
89
  Generate alt text for each of the images.
90
  If the photo does not contain a garment, return 'No garment detected'.
91
  If the photo contains a garment, return the result in in the following JSON format without any preceding or trailing text:
@@ -93,7 +93,7 @@ def detect_features(image_paths, garment_type):
93
  "features": [list of comma separated features],
94
  "intended_use": [list of comma separated intended uses],
95
  "alt_text": [alt text for image 1, alt text for image 2]
96
- }"""
97
  },
98
  ] + [{
99
  "type": "image_url",
 
84
  "content": [
85
  {
86
  "type": "text",
87
+ "text": """Describe the features of the %s in the photos in less than 100 words.
88
+ What is the intended use of the %s in this image, use at most 5 words for intended use?
89
  Generate alt text for each of the images.
90
  If the photo does not contain a garment, return 'No garment detected'.
91
  If the photo contains a garment, return the result in in the following JSON format without any preceding or trailing text:
 
93
  "features": [list of comma separated features],
94
  "intended_use": [list of comma separated intended uses],
95
  "alt_text": [alt text for image 1, alt text for image 2]
96
+ }""" % (garment_type, garment_type)
97
  },
98
  ] + [{
99
  "type": "image_url",