RobotJelly commited on
Commit
3a217c5
·
1 Parent(s): 5b4aa40
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -18,10 +18,12 @@ def show_output_image(matched_images, photos) :
18
  #photo_image_url = f"https://unsplash.com/photos/{photo_id}?w=640"
19
  #photo_image_url = f"https://unsplash.com/photos/{photo_id}?ixid=2yJhcHBfaWQiOjEyMDd9&fm=jpg"
20
  photo_found = photos[photos["photo_id"] == photo_id].iloc[0]
21
- response = requests.get(photo_found["photo_image_url"] + "?w=640")
22
  #response = requests.get(photo_image_url)
23
- img = Image.open(BytesIO(response.content))
24
  #return img
 
 
25
  image.append(img)
26
  return image
27
  # Encode and normalize the search query using CLIP
 
18
  #photo_image_url = f"https://unsplash.com/photos/{photo_id}?w=640"
19
  #photo_image_url = f"https://unsplash.com/photos/{photo_id}?ixid=2yJhcHBfaWQiOjEyMDd9&fm=jpg"
20
  photo_found = photos[photos["photo_id"] == photo_id].iloc[0]
21
+ #response = requests.get(photo_found["photo_image_url"] + "?w=640")
22
  #response = requests.get(photo_image_url)
23
+ #img = Image.open(BytesIO(response.content))
24
  #return img
25
+ image_path = './photos/' + photo_id + '.jpg'
26
+ img = Image.open(image_path)
27
  image.append(img)
28
  return image
29
  # Encode and normalize the search query using CLIP