Not-Adam commited on
Commit
122cc97
1 Parent(s): 96e5c46
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -188,12 +188,12 @@ def get_predicted_attributes(image_urls, category):
188
  if key == "details":
189
  details_split = value.split(" , ")
190
  if len(details_split) == 2:
191
- result["details_1"] = details_split[0]
192
- result["details_2"] = details_split[1]
193
  else:
194
- result["details_1"] = value # If there's only one detail, assign it to details 1
195
  else:
196
- result[key] = value
197
 
198
  return result
199
 
 
188
  if key == "details":
189
  details_split = value.split(" , ")
190
  if len(details_split) == 2:
191
+ result["details1"] = details_split[0].lower()
192
+ result["details2"] = details_split[1].lower()
193
  else:
194
+ result["details1"] = value.lower() # If there's only one detail, assign it to details 1
195
  else:
196
+ result[key.lower().replace("collar", "colartype").replace("sleeve length", "sleevelength").replace("fabric", "fabricstyle")] = value.lower()
197
 
198
  return result
199