Redmind commited on
Commit
295e833
·
verified ·
1 Parent(s): 243eb87

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,7 +12,7 @@ import chromadb
12
 
13
  app = FastAPI()
14
  client = chromadb.PersistentClient(path="/data/chroma_db")
15
- collection = client.get_or_create_collection(name="knowledge_base", metadata={"hnsw:space": "cosine", "dimension": 512})
16
 
17
  print("Created collection with 512 dimensions!")
18
 
@@ -24,7 +24,7 @@ collection = client.get_collection(name="knowledge_base")
24
  print("Collection Embedding Dimension:", collection.metadata)
25
 
26
  # Initialize models
27
- text_model = SentenceTransformer('all-MiniLM-L6-v2')
28
  clip_model = CLIPModel.from_pretrained("openai/clip-vit-base-patch32")
29
  clip_processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32")
30
 
 
12
 
13
  app = FastAPI()
14
  client = chromadb.PersistentClient(path="/data/chroma_db")
15
+ collection = client.get_or_create_collection(name="knowledge_base")
16
 
17
  print("Created collection with 512 dimensions!")
18
 
 
24
  print("Collection Embedding Dimension:", collection.metadata)
25
 
26
  # Initialize models
27
+ text_model = SentenceTransformer('sentence-transformers/all-MiniLM-L12-v2')
28
  clip_model = CLIPModel.from_pretrained("openai/clip-vit-base-patch32")
29
  clip_processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32")
30