tunght commited on
Commit
3dc4466
·
1 Parent(s): 2d7faa6

add gpt-4o

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -106,7 +106,8 @@ def detect_features(image_paths, garment_type, language="English"):
106
  }
107
 
108
  payload = {
109
- "model": "gpt-4o",
 
110
  "messages": [
111
  {
112
  "role": "user",
@@ -122,7 +123,7 @@ def detect_features(image_paths, garment_type, language="English"):
122
  {
123
  "features": [list of comma separated features],
124
  "intended_use": [list of comma separated intended uses],
125
- "alt_text": [alt text for image 1, alt text for image 2]
126
  }""" % (garment_type, garment_type, language)
127
  },
128
  ] + [{
@@ -189,7 +190,8 @@ def generate(*data):
189
  Use language that is suitable for the type of document specified in the reference structure.
190
  Use a consistent tone of voice throughout the text.
191
  If the reference text is not empty, write the product description in the tone of voice of the reference text.
192
- Make sure to output the product description only, do not include any preceeding text like "Here is your product description" or any part of the reference structure in the output.
 
193
  \n\n {feature + detected_features} \n{intended_use} \nReference structure: {structure}\n Reference text: {reference}""")]
194
  batch.append(messages)
195
 
 
106
  }
107
 
108
  payload = {
109
+ # "model": "gpt-4o",
110
+ "model": "gpt-4-turbo",
111
  "messages": [
112
  {
113
  "role": "user",
 
123
  {
124
  "features": [list of comma separated features],
125
  "intended_use": [list of comma separated intended uses],
126
+ "alt_text": [list of alt text for image 1, alt text for image 2]
127
  }""" % (garment_type, garment_type, language)
128
  },
129
  ] + [{
 
190
  Use language that is suitable for the type of document specified in the reference structure.
191
  Use a consistent tone of voice throughout the text.
192
  If the reference text is not empty, write the product description in the tone of voice of the reference text.
193
+ Make sure to output the product description only, do not include any preceeding text like "Here is your product description".
194
+ Do not include any part of the reference structure in the output.
195
  \n\n {feature + detected_features} \n{intended_use} \nReference structure: {structure}\n Reference text: {reference}""")]
196
  batch.append(messages)
197