Update app.py
Browse files
app.py
CHANGED
|
@@ -58,7 +58,7 @@ class Vectorstore:
|
|
| 58 |
"""
|
| 59 |
Embeds the document chunks using the Cohere API.
|
| 60 |
"""
|
| 61 |
-
print("Embedding document chunks...")
|
| 62 |
|
| 63 |
batch_size = 90
|
| 64 |
self.docs_len = len(self.docs)
|
|
@@ -72,7 +72,7 @@ class Vectorstore:
|
|
| 72 |
embedding_types=["float"]
|
| 73 |
).embeddings.float
|
| 74 |
self.docs_embs.extend(docs_embs_batch)
|
| 75 |
-
print(docs_embs_batch)
|
| 76 |
|
| 77 |
def index(self) -> None:
|
| 78 |
"""
|
|
@@ -84,7 +84,7 @@ class Vectorstore:
|
|
| 84 |
self.idx.init_index(max_elements=self.docs_len, ef_construction=512, M=64)
|
| 85 |
self.idx.add_items(self.docs_embs, list(range(len(self.docs_embs))))
|
| 86 |
|
| 87 |
-
print(f"Indexing complete with {self.idx.get_current_count()} document chunks.")
|
| 88 |
|
| 89 |
def retrieve(self, query: str) -> List[Dict[str, str]]:
|
| 90 |
"""
|
|
|
|
| 58 |
"""
|
| 59 |
Embeds the document chunks using the Cohere API.
|
| 60 |
"""
|
| 61 |
+
#print("Embedding document chunks...")
|
| 62 |
|
| 63 |
batch_size = 90
|
| 64 |
self.docs_len = len(self.docs)
|
|
|
|
| 72 |
embedding_types=["float"]
|
| 73 |
).embeddings.float
|
| 74 |
self.docs_embs.extend(docs_embs_batch)
|
| 75 |
+
#print(docs_embs_batch)
|
| 76 |
|
| 77 |
def index(self) -> None:
|
| 78 |
"""
|
|
|
|
| 84 |
self.idx.init_index(max_elements=self.docs_len, ef_construction=512, M=64)
|
| 85 |
self.idx.add_items(self.docs_embs, list(range(len(self.docs_embs))))
|
| 86 |
|
| 87 |
+
#print(f"Indexing complete with {self.idx.get_current_count()} document chunks.")
|
| 88 |
|
| 89 |
def retrieve(self, query: str) -> List[Dict[str, str]]:
|
| 90 |
"""
|