Spaces:
Runtime error
Runtime error
Update app.py
Browse filesMoving to single pdf --> Highway.
app.py
CHANGED
@@ -95,13 +95,13 @@ def main():
|
|
95 |
# Initialize session state
|
96 |
initialize_session_state()
|
97 |
st.title("Multi-Docs ChatBot using llama-2-7b :books:")
|
98 |
-
|
99 |
-
|
100 |
-
documents = []
|
101 |
-
for file_path in file_paths:
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
|
106 |
text_splitter=CharacterTextSplitter(separator='\n',
|
107 |
chunk_size=1500,
|
|
|
95 |
# Initialize session state
|
96 |
initialize_session_state()
|
97 |
st.title("Multi-Docs ChatBot using llama-2-7b :books:")
|
98 |
+
loader = UnstructuredFileLoader('./Highway Traffic Act, R.S.O. 1990, c. H.8[465] - Copy.pdf')
|
99 |
+
documents = loader.load()
|
100 |
+
# documents = []
|
101 |
+
# for file_path in file_paths:
|
102 |
+
# loader = UnstructuredFileLoader(file_path)
|
103 |
+
# loaded_doc = loader.load() # Assuming this returns a list of pages
|
104 |
+
# documents.extend(loaded_doc)
|
105 |
|
106 |
text_splitter=CharacterTextSplitter(separator='\n',
|
107 |
chunk_size=1500,
|