traopia commited on
Commit
997d13b
·
1 Parent(s): 19ee29e

name chroma

Browse files
Files changed (1) hide show
  1. src/visual_qa.py +0 -13
src/visual_qa.py CHANGED
@@ -26,20 +26,7 @@ def initialize_collection(collection_name="clip_image_embeddings"):
26
 
27
  return collection
28
 
29
- def initialize_collection(collection_name="clip_image_embeddings"):
30
- client = chromadb.PersistentClient(path="./chroma_db")
31
-
32
- # Extract just the collection names
33
- existing_collections = [col.name for col in client.list_collections()]
34
 
35
- if collection_name in existing_collections:
36
- collection = client.get_collection(name=collection_name)
37
- print(f"Using existing collection: {collection_name}")
38
- else:
39
- collection = client.create_collection(name=collection_name)
40
- print(f"Created new collection: {collection_name}")
41
-
42
- return collection
43
 
44
  def main_create_image_collection(df_emb, collection_name="clip_image_embeddings"):
45
  documents = []
 
26
 
27
  return collection
28
 
 
 
 
 
 
29
 
 
 
 
 
 
 
 
 
30
 
31
  def main_create_image_collection(df_emb, collection_name="clip_image_embeddings"):
32
  documents = []