Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -192,9 +192,15 @@ def get_caption(img,model_name):
|
|
| 192 |
# def search_images(text):
|
| 193 |
# return get_images(text, api_name="images")
|
| 194 |
|
| 195 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 196 |
with open(emb_filename, 'rb') as emb:
|
| 197 |
-
|
| 198 |
|
| 199 |
|
| 200 |
def search(search_query):
|
|
|
|
| 192 |
# def search_images(text):
|
| 193 |
# return get_images(text, api_name="images")
|
| 194 |
|
| 195 |
+
|
| 196 |
+
emb_filename = hf_hub_download(
|
| 197 |
+
repo_id="ryaalbr/QuestApp",
|
| 198 |
+
filename="unsplash-25k-photos-embeddings-indexes.pkl",
|
| 199 |
+
repo_type="space"
|
| 200 |
+
)
|
| 201 |
+
|
| 202 |
with open(emb_filename, 'rb') as emb:
|
| 203 |
+
id2url, img_names, img_emb = pickle.load(emb)
|
| 204 |
|
| 205 |
|
| 206 |
def search(search_query):
|