Spaces:
Runtime error
Runtime error
Commit ·
4272504
1
Parent(s): 8182e16
Update main.py
Browse files
main.py
CHANGED
|
@@ -29,7 +29,7 @@ def predict(Item):
|
|
| 29 |
# encoded_image = model.encode(Image.open(filepath))
|
| 30 |
#image_names = list(glob.glob('./*.jpg'))
|
| 31 |
#print("Images:", len(image_names))
|
| 32 |
-
encoded_image = model.encode([Item.image1, Item.image2]
|
| 33 |
|
| 34 |
# Now we run the clustering algorithm. This function compares images aganist
|
| 35 |
# all other images and returns a list with the pairs that have the highest
|
|
|
|
| 29 |
# encoded_image = model.encode(Image.open(filepath))
|
| 30 |
#image_names = list(glob.glob('./*.jpg'))
|
| 31 |
#print("Images:", len(image_names))
|
| 32 |
+
encoded_image = model.encode([Item.image1, Item.image2], batch_size=128, convert_to_tensor=True, show_progress_bar=True)
|
| 33 |
|
| 34 |
# Now we run the clustering algorithm. This function compares images aganist
|
| 35 |
# all other images and returns a list with the pairs that have the highest
|