csalabs commited on
Commit
575b86e
·
1 Parent(s): 070e0dc

Update app.py

Browse files

Uncomment Multiple file uploading.

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('./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,