Update app.py
Browse files
app.py
CHANGED
|
@@ -85,9 +85,9 @@ class DocumentRAG:
|
|
| 85 |
)
|
| 86 |
documents = text_splitter.split_documents(documents)
|
| 87 |
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
|
| 92 |
# Create embeddings and initialize retrieval chain
|
| 93 |
embeddings = OpenAIEmbeddings(api_key=self.api_key)
|
|
|
|
| 85 |
)
|
| 86 |
documents = text_splitter.split_documents(documents)
|
| 87 |
|
| 88 |
+
# Combine text for later summary generation
|
| 89 |
+
self.document_text = " ".join([doc.page_content for doc in documents]) # Store for later use
|
| 90 |
+
|
| 91 |
|
| 92 |
# Create embeddings and initialize retrieval chain
|
| 93 |
embeddings = OpenAIEmbeddings(api_key=self.api_key)
|