Updated
Browse files
app.py
CHANGED
|
@@ -65,10 +65,10 @@ if file is not None:
|
|
| 65 |
cols = st.columns(3) # 3 images per row
|
| 66 |
|
| 67 |
for i, idx in enumerate(indices[0]):
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
|
| 73 |
st.write(product_path)
|
| 74 |
product_image = Image.open(product_path)
|
|
|
|
| 65 |
cols = st.columns(3) # 3 images per row
|
| 66 |
|
| 67 |
for i, idx in enumerate(indices[0]):
|
| 68 |
+
product_path = filenames[idx] if filenames[idx].startswith('images/') else 'images/' + filenames[idx]
|
| 69 |
+
|
| 70 |
+
# Replace any instances of double backslashes with a single one
|
| 71 |
+
product_path = product_path.replace('\\', '/')
|
| 72 |
|
| 73 |
st.write(product_path)
|
| 74 |
product_image = Image.open(product_path)
|