Tonic commited on
Commit
ad39d92
1 Parent(s): 69445bb

fix unstructured loader

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. requirements.txt +1 -0
app.py CHANGED
@@ -193,7 +193,7 @@ def respond(
193
  def upload_documents(files):
194
  for file in files:
195
  loader = UnstructuredFileLoader(file.name)
196
- documents = loader.load_documents()
197
  add_documents_to_chroma(chroma_client, chroma_collection, documents, embedding_function)
198
  return "Documents uploaded and processed successfully!"
199
 
 
193
  def upload_documents(files):
194
  for file in files:
195
  loader = UnstructuredFileLoader(file.name)
196
+ documents = loader.load()
197
  add_documents_to_chroma(chroma_client, chroma_collection, documents, embedding_function)
198
  return "Documents uploaded and processed successfully!"
199
 
requirements.txt CHANGED
@@ -10,6 +10,7 @@ langchain-community
10
  langchain-chroma
11
  unstructured[all-docs]
12
  libmagic
 
13
  # poppler
14
  # tesseract
15
  # libxml2
 
10
  langchain-chroma
11
  unstructured[all-docs]
12
  libmagic
13
+ gradio
14
  # poppler
15
  # tesseract
16
  # libxml2