user-agent Not-Adam commited on
Commit
c4ff1c3
1 Parent(s): 7c8bb6a

Update app.py (#2)

Browse files

- Update app.py (66c0fa470ee3238e1c5947ae4601a37d3205847b)


Co-authored-by: Adam Pavie <Not-Adam@users.noreply.huggingface.co>

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -165,7 +165,7 @@ def get_predicted_attributes(image_urls, category):
165
 
166
  # Get the predicted values for the attribute
167
  responses = pipe(image_urls, candidate_labels=values_formatted)
168
- result = [response[0]['label'].split(", clothing:")[0].replace("collar", "colartype").replace("sleeve length", "sleevelength").replace("fabric", "fabricstyle") for response in responses]
169
 
170
  # If attribute is details, then get the top 2 most common labels
171
  if attribute_formatted == "details":
 
165
 
166
  # Get the predicted values for the attribute
167
  responses = pipe(image_urls, candidate_labels=values_formatted)
168
+ result = [response[0]['label'].split(", clothing:")[0] for response in responses]
169
 
170
  # If attribute is details, then get the top 2 most common labels
171
  if attribute_formatted == "details":