Spaces:
Runtime error
Runtime error
syedmudassir16
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -43,7 +43,8 @@ class DocumentRetrievalAndGeneration:
|
|
43 |
all_texts = [split.page_content for split in self.all_splits]
|
44 |
embeddings = self.embeddings.encode(all_texts, convert_to_tensor=True).cpu().numpy()
|
45 |
vectordb = FAISS.from_embeddings(
|
46 |
-
|
|
|
47 |
model=self.embeddings,
|
48 |
metadatas=[{"source": f"doc_{i}"} for i in range(len(all_texts))]
|
49 |
)
|
|
|
43 |
all_texts = [split.page_content for split in self.all_splits]
|
44 |
embeddings = self.embeddings.encode(all_texts, convert_to_tensor=True).cpu().numpy()
|
45 |
vectordb = FAISS.from_embeddings(
|
46 |
+
texts=all_texts, # Provide texts separately
|
47 |
+
embeddings=embeddings, # Provide embeddings separately
|
48 |
model=self.embeddings,
|
49 |
metadatas=[{"source": f"doc_{i}"} for i in range(len(all_texts))]
|
50 |
)
|