Update pages/Report_Writer.py
Browse files- pages/Report_Writer.py +2 -2
pages/Report_Writer.py
CHANGED
@@ -22,7 +22,7 @@ llm = Gemini(api_key=os.getenv("GOOGLE_API_KEY"), temperature=0.1, model_name="m
|
|
22 |
|
23 |
# Load and index the input data
|
24 |
def load_data(document_text):
|
25 |
-
document = [Document(text=document_text
|
26 |
|
27 |
#index = VectorStoreIndex.from_documents([document])
|
28 |
index = DocumentSummaryIndex.from_documents(document)
|
@@ -141,7 +141,7 @@ def main():
|
|
141 |
|
142 |
# Load data and generate report
|
143 |
doc_list = document_text.split(".")
|
144 |
-
index = load_data(
|
145 |
report = generate_report(index, report_format, additional_info)
|
146 |
|
147 |
st.write("## Generated Report")
|
|
|
22 |
|
23 |
# Load and index the input data
|
24 |
def load_data(document_text):
|
25 |
+
document = [Document(text=doc_text) for doc_text in document_text]
|
26 |
|
27 |
#index = VectorStoreIndex.from_documents([document])
|
28 |
index = DocumentSummaryIndex.from_documents(document)
|
|
|
141 |
|
142 |
# Load data and generate report
|
143 |
doc_list = document_text.split(".")
|
144 |
+
index = load_data(doc_list)
|
145 |
report = generate_report(index, report_format, additional_info)
|
146 |
|
147 |
st.write("## Generated Report")
|