Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,7 +13,10 @@ app = FastAPI()
|
|
| 13 |
|
| 14 |
# Initialize ChromaDB with 512 dimensions
|
| 15 |
client = chromadb.PersistentClient(path="/data/chroma_db")
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
# File Paths
|
| 19 |
pdf_file = "Sutures and Suturing techniques.pdf"
|
|
|
|
| 13 |
|
| 14 |
# Initialize ChromaDB with 512 dimensions
|
| 15 |
client = chromadb.PersistentClient(path="/data/chroma_db")
|
| 16 |
+
client.delete_collection(name="knowledge_base")
|
| 17 |
+
collection = client.get_or_create_collection(name="knowledge_base", metadata={"dim": 512})
|
| 18 |
+
|
| 19 |
+
#collection = client.get_or_create_collection(name="knowledge_base", metadata={"hnsw:space": "cosine"}, embedding_function=None)
|
| 20 |
|
| 21 |
# File Paths
|
| 22 |
pdf_file = "Sutures and Suturing techniques.pdf"
|