Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
@@ -75,13 +75,14 @@ def get_similar_products_cnn(product_id, num_results):
|
|
75 |
#### Top {num_results} Recommended items
|
76 |
""")
|
77 |
for i in range(1,len(indices)):
|
78 |
-
rows = fashion_df[['Gender','ImageURL','ProductTitle']].loc[fashion_df['ProductId']==Productids[indices[i]]]
|
79 |
for indx, row in rows.iterrows():
|
80 |
#image = Image.open(Image(url=row['ImageURL'], width = 224, height = 224,embed=True))
|
81 |
image = Image.open(urllib.request.urlopen(row['ImageURL']))
|
82 |
image = image.resize((224,224))
|
83 |
st.image(image)
|
84 |
st.write(f"Gender Class: {row['Gender']}")
|
|
|
85 |
st.write(f"Product Title: {row['ProductTitle']}")
|
86 |
#st.write(f"Euclidean Distance from input image: {pdists[i]}")
|
87 |
|
|
|
75 |
#### Top {num_results} Recommended items
|
76 |
""")
|
77 |
for i in range(1,len(indices)):
|
78 |
+
rows = fashion_df[['Gender','ImageURL','ProductTitle','SubCategory']].loc[fashion_df['ProductId']==Productids[indices[i]]]
|
79 |
for indx, row in rows.iterrows():
|
80 |
#image = Image.open(Image(url=row['ImageURL'], width = 224, height = 224,embed=True))
|
81 |
image = Image.open(urllib.request.urlopen(row['ImageURL']))
|
82 |
image = image.resize((224,224))
|
83 |
st.image(image)
|
84 |
st.write(f"Gender Class: {row['Gender']}")
|
85 |
+
st.write(f"Sub Category: {row['SubCategory']}")
|
86 |
st.write(f"Product Title: {row['ProductTitle']}")
|
87 |
#st.write(f"Euclidean Distance from input image: {pdists[i]}")
|
88 |
|