Update app.py
Browse files
app.py
CHANGED
@@ -80,7 +80,7 @@ def find_best_matches(image, mode, text):
|
|
80 |
best_photos = sorted(zip(similarities, range(photo_features.shape[0])), key=lambda x: x[0], reverse=True)
|
81 |
|
82 |
matched_images = []
|
83 |
-
for i in range(
|
84 |
# Retrieve the photo ID
|
85 |
idx = best_photos[i][1]
|
86 |
photo_id = photo_ids[idx]
|
@@ -107,6 +107,6 @@ gr.Interface(fn=find_best_matches,
|
|
107 |
outputs=[gr.Gallery(label="Generated images", show_label=False, elem_id="gallery")],
|
108 |
#enable_queue=True,
|
109 |
title="CLIP Image Search",
|
110 |
-
description="This application displays TOP
|
111 |
).launch()
|
112 |
|
|
|
80 |
best_photos = sorted(zip(similarities, range(photo_features.shape[0])), key=lambda x: x[0], reverse=True)
|
81 |
|
82 |
matched_images = []
|
83 |
+
for i in range(4):
|
84 |
# Retrieve the photo ID
|
85 |
idx = best_photos[i][1]
|
86 |
photo_id = photo_ids[idx]
|
|
|
107 |
outputs=[gr.Gallery(label="Generated images", show_label=False, elem_id="gallery")],
|
108 |
#enable_queue=True,
|
109 |
title="CLIP Image Search",
|
110 |
+
description="This application displays TOP Four images from Unsplash dataset that best match the search query provided by the user. Moreover, the input can be provided via two modes ie text or image form."
|
111 |
).launch()
|
112 |
|