Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update auditqa/process_chunks.py
Browse files
auditqa/process_chunks.py
CHANGED
@@ -69,12 +69,13 @@ def load_chunks():
|
|
69 |
# add metadata information
|
70 |
chunks_list = []
|
71 |
for doc in doc_processed:
|
72 |
-
chunks_list.append(Document(page_content=doc['content'],
|
73 |
metadata={"source": category,
|
74 |
"subtype":subtype,
|
75 |
"year":file[-4:],
|
76 |
"filename":file,
|
77 |
-
"page":doc['metadata']['page']
|
|
|
78 |
|
79 |
all_documents[category].append(chunks_list)
|
80 |
|
|
|
69 |
# add metadata information
|
70 |
chunks_list = []
|
71 |
for doc in doc_processed:
|
72 |
+
chunks_list.append(Document(page_content= doc['content'],
|
73 |
metadata={"source": category,
|
74 |
"subtype":subtype,
|
75 |
"year":file[-4:],
|
76 |
"filename":file,
|
77 |
+
"page":doc['metadata']['page'],
|
78 |
+
"headings":doc['metadata']['headings']}))
|
79 |
|
80 |
all_documents[category].append(chunks_list)
|
81 |
|