Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,9 @@ import chromadb
|
|
| 12 |
|
| 13 |
app = FastAPI()
|
| 14 |
client = chromadb.PersistentClient(path="/data/chroma_db")
|
| 15 |
-
collection = client.get_or_create_collection(name="knowledge_base")
|
|
|
|
|
|
|
| 16 |
|
| 17 |
pdf_file="Sutures and Suturing techniques.pdf"
|
| 18 |
pptx_file="impalnt 1.pptx"
|
|
|
|
| 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 |
|
| 19 |
pdf_file="Sutures and Suturing techniques.pdf"
|
| 20 |
pptx_file="impalnt 1.pptx"
|