Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -40,8 +40,8 @@ def find_best_matches(text):
|
|
40 |
for i in range(3):
|
41 |
idx = sorted(zip(similarities, range(photo_features.shape[0])), key=lambda x: x[0], reverse=True)[i][1]
|
42 |
photo_id = photo_ids[idx]
|
43 |
-
photo_data = photos[photos["
|
44 |
-
response = requests.get(photo_data["
|
45 |
img = PILIMAGE.open(BytesIO(response.content))
|
46 |
matched_images.append(img)
|
47 |
return matched_images
|
|
|
40 |
for i in range(3):
|
41 |
idx = sorted(zip(similarities, range(photo_features.shape[0])), key=lambda x: x[0], reverse=True)[i][1]
|
42 |
photo_id = photo_ids[idx]
|
43 |
+
photo_data = photos[photos["Uniq Id"] == photo_id].iloc[0]
|
44 |
+
response = requests.get(photo_data["Image"] + "?w=640")
|
45 |
img = PILIMAGE.open(BytesIO(response.content))
|
46 |
matched_images.append(img)
|
47 |
return matched_images
|