Spaces:
Build error
Build error
Commit ·
60b18f5
1
Parent(s): 06ffe20
app.py
Browse files
app.py
CHANGED
|
@@ -34,12 +34,12 @@ def show_output_image(matched_images) :
|
|
| 34 |
image=[]
|
| 35 |
for photo_id in matched_images:
|
| 36 |
photo_image_url = f"https://unsplash.com/photos/{photo_id}/download?w=280"
|
| 37 |
-
|
| 38 |
-
|
| 39 |
#response = requests.get(photo_image_url, stream=True).raw
|
| 40 |
-
photo = photo_id + '.jpg'
|
| 41 |
#img = Image.open(response).convert("RGB")
|
| 42 |
-
img = Image.open(os.path.join(IMAGES_DIR, photo))
|
| 43 |
image.append(img)
|
| 44 |
return image
|
| 45 |
|
|
|
|
| 34 |
image=[]
|
| 35 |
for photo_id in matched_images:
|
| 36 |
photo_image_url = f"https://unsplash.com/photos/{photo_id}/download?w=280"
|
| 37 |
+
response = requests.get(photo_image_url, stream=True)
|
| 38 |
+
img = Image.open(BytesIO(response.content))
|
| 39 |
#response = requests.get(photo_image_url, stream=True).raw
|
| 40 |
+
#photo = photo_id + '.jpg'
|
| 41 |
#img = Image.open(response).convert("RGB")
|
| 42 |
+
#img = Image.open(os.path.join(IMAGES_DIR, photo))
|
| 43 |
image.append(img)
|
| 44 |
return image
|
| 45 |
|