Update app.py
Browse files
app.py
CHANGED
|
@@ -126,6 +126,8 @@ def main():
|
|
| 126 |
start_index = (tabs - 1) * images_per_page
|
| 127 |
end_index = min(start_index + images_per_page, length)
|
| 128 |
|
|
|
|
|
|
|
| 129 |
for img_id in similar_images:
|
| 130 |
row = df[df['seller_img_id'] == img_id]
|
| 131 |
if not row.empty:
|
|
@@ -142,6 +144,8 @@ def main():
|
|
| 142 |
# Determine the column to place the image in
|
| 143 |
col_index = index % num_columns
|
| 144 |
st.image(resized_image, caption=f'Product ID: {product_id}\nImage ID: {img_id}', width=image_width)
|
|
|
|
|
|
|
| 145 |
else:
|
| 146 |
st.write(f"Could not find details for image with ID: {img_id}")
|
| 147 |
|
|
|
|
| 126 |
start_index = (tabs - 1) * images_per_page
|
| 127 |
end_index = min(start_index + images_per_page, length)
|
| 128 |
|
| 129 |
+
index = 0
|
| 130 |
+
|
| 131 |
for img_id in similar_images:
|
| 132 |
row = df[df['seller_img_id'] == img_id]
|
| 133 |
if not row.empty:
|
|
|
|
| 144 |
# Determine the column to place the image in
|
| 145 |
col_index = index % num_columns
|
| 146 |
st.image(resized_image, caption=f'Product ID: {product_id}\nImage ID: {img_id}', width=image_width)
|
| 147 |
+
index += 1
|
| 148 |
+
|
| 149 |
else:
|
| 150 |
st.write(f"Could not find details for image with ID: {img_id}")
|
| 151 |
|