EvgenyK commited on
Commit
c3831fc
·
1 Parent(s): 4d9c702

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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["photo_id"] == photo_id].iloc[0]
44
- response = requests.get(photo_data["photo_image_url"] + "?w=640")
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