JoJosmin commited on
Commit
6c806d0
โ€ข
1 Parent(s): 3c76019

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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