Update app.py (#2)
Browse files- Update app.py (66c0fa470ee3238e1c5947ae4601a37d3205847b)
Co-authored-by: Adam Pavie <Not-Adam@users.noreply.huggingface.co>
164 unmodified lines165166167168169170171164 unmodified lines# Get the predicted values for the attributeresponses = pipe(image_urls, candidate_labels=values_formatted)result = [response[0]['label'].split(", clothing:")[0].replace("collar", "colartype").replace("sleeve length", "sleevelength").replace("fabric", "fabricstyle") for response in responses]# If attribute is details, then get the top 2 most common labelsif attribute_formatted == "details":164 unmodified lines165166167168169170171164 unmodified lines# Get the predicted values for the attributeresponses = pipe(image_urls, candidate_labels=values_formatted)result = [response[0]['label'].split(", clothing:")[0] for response in responses]# If attribute is details, then get the top 2 most common labelsif attribute_formatted == "details":
app.py+1-1