Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,7 +31,7 @@ def predict_apparel_and_attributes(image):
|
|
| 31 |
# Get top category and attributes
|
| 32 |
top_category = categories[category_similarities.argmax().item()]
|
| 33 |
top_attributes = [attributes[i] for i in attribute_similarities.argsort(descending=True)[:3]] # top 3 attributes
|
| 34 |
-
|
| 35 |
return top_category, ", ".join(top_attributes)
|
| 36 |
|
| 37 |
# Define Gradio interface
|
|
|
|
| 31 |
# Get top category and attributes
|
| 32 |
top_category = categories[category_similarities.argmax().item()]
|
| 33 |
top_attributes = [attributes[i] for i in attribute_similarities.argsort(descending=True)[:3]] # top 3 attributes
|
| 34 |
+
print(f"results:{top_category, ','.join(top_attributes)}")
|
| 35 |
return top_category, ", ".join(top_attributes)
|
| 36 |
|
| 37 |
# Define Gradio interface
|