Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -175,7 +175,7 @@ def find_similar_images(query_embedding, collection, top_k=5):
|
|
175 |
# ๊ฒ์๋ ์์ ๊ฒฐ๊ณผ๋ฅผ ๋ฐํ
|
176 |
structured_results = []
|
177 |
for metadata, idx in zip(all_metadatas, indices[0]):
|
178 |
-
similarity = np.dot(query_embedding, all_embeddings[idx]) # ์ฝ์ฌ์ธ ์ ์ฌ๋ ๊ณ์ฐ
|
179 |
structured_results.append({
|
180 |
'info': metadata,
|
181 |
'similarity': similarity
|
|
|
175 |
# ๊ฒ์๋ ์์ ๊ฒฐ๊ณผ๋ฅผ ๋ฐํ
|
176 |
structured_results = []
|
177 |
for metadata, idx in zip(all_metadatas, indices[0]):
|
178 |
+
similarity = np.dot(query_embedding, all_embeddings[idx]).item() # ์ฝ์ฌ์ธ ์ ์ฌ๋ ๊ณ์ฐ
|
179 |
structured_results.append({
|
180 |
'info': metadata,
|
181 |
'similarity': similarity
|