Spaces:
Sleeping
Sleeping
Update rag_processor.py
Browse files- rag_processor.py +1 -1
rag_processor.py
CHANGED
|
@@ -19,7 +19,7 @@ class RAGProcessor:
|
|
| 19 |
def add_documents(self, documents: List[Document]):
|
| 20 |
"""Add documents to the RAG system."""
|
| 21 |
self.documents = [doc.page_content for doc in documents]
|
| 22 |
-
embeddings = self.model.encode(documents)
|
| 23 |
|
| 24 |
# Create FAISS index
|
| 25 |
dimension = embeddings.shape[1]
|
|
|
|
| 19 |
def add_documents(self, documents: List[Document]):
|
| 20 |
"""Add documents to the RAG system."""
|
| 21 |
self.documents = [doc.page_content for doc in documents]
|
| 22 |
+
embeddings = self.model.encode(self.documents)
|
| 23 |
|
| 24 |
# Create FAISS index
|
| 25 |
dimension = embeddings.shape[1]
|