Replace tags
Browse files
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] 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].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":
|