tdecae commited on
Commit
fa0c3bc
1 Parent(s): 24e24e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -21,17 +21,17 @@ os.environ["OPENAI_API_KEY"] = os.getenv("OPENAPIKEY")
21
 
22
  docs = []
23
 
24
- for f in os.listdir("input/multiple_docs"):
25
  if f.endswith(".pdf"):
26
- pdf_path = "./input/multiple_docs/" + f
27
  loader = PyPDFLoader(pdf_path)
28
  docs.extend(loader.load())
29
  elif f.endswith('.docx') or f.endswith('.doc'):
30
- doc_path = "./input/multiple_docs/" + f
31
  loader = Docx2txtLoader(doc_path)
32
  docs.extend(loader.load())
33
  elif f.endswith('.txt'):
34
- text_path = "./input/multiple_docs/" + f
35
  loader = TextLoader(text_path)
36
  docs.extend(loader.load())
37
 
 
21
 
22
  docs = []
23
 
24
+ for f in os.listdir("multiple_docs"):
25
  if f.endswith(".pdf"):
26
+ pdf_path = "./multiple_docs/" + f
27
  loader = PyPDFLoader(pdf_path)
28
  docs.extend(loader.load())
29
  elif f.endswith('.docx') or f.endswith('.doc'):
30
+ doc_path = "./multiple_docs/" + f
31
  loader = Docx2txtLoader(doc_path)
32
  docs.extend(loader.load())
33
  elif f.endswith('.txt'):
34
+ text_path = "./multiple_docs/" + f
35
  loader = TextLoader(text_path)
36
  docs.extend(loader.load())
37