JoJosmin commited on
Commit
5069701
·
verified ·
1 Parent(s): 6a049f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -101,6 +101,15 @@ def find_similar_images(query_embedding, collection, top_k=5):
101
 
102
  # 메타데이터 가져옴
103
  all_data = collection.get(include=['metadatas'])['metadatas']
 
 
 
 
 
 
 
 
 
104
  if len(all_data) == 0:
105
  st.error("No metadatas found in the collection.")
106
  return []
 
101
 
102
  # 메타데이터 가져옴
103
  all_data = collection.get(include=['metadatas'])['metadatas']
104
+ st.write(f"Embeddings found: {len(all_data['embeddings'])}")
105
+ st.write(f"Metadatas found: {len(all_data['metadatas'])}")
106
+ st.write(f"Documents found: {len(all_data['documents'])}")
107
+
108
+ # 벡터 ID를 함께 가져와서 확인
109
+ vector_data = collection.get(include=['embeddings', 'metadatas', 'ids'])
110
+
111
+ for idx, vector_id in enumerate(vector_data['ids']):
112
+ st.write(f"ID: {vector_id}, Embedding: {vector_data['embeddings'][idx]}")
113
  if len(all_data) == 0:
114
  st.error("No metadatas found in the collection.")
115
  return []