csalabs commited on
Commit
01e2ae7
·
1 Parent(s): 575b86e

Update app.py

Browse files

Moving to single pdf --> Highway.

Files changed (1) hide show
  1. app.py +7 -7
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
- # loader = UnstructuredFileLoader('./Freedom of Information and Protection of Privacy Act, R.S.O. 1990, c. F.31[462] - 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,
 
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,