Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -58,12 +58,14 @@ from langchain.schema import Document
|
|
58 |
|
59 |
|
60 |
|
61 |
-
def langchain_document_loader(
|
62 |
"""
|
63 |
Load documents from the temporary directory (TMP_DIR).
|
64 |
Files can be in txt, pdf, CSV or docx format.
|
65 |
"""
|
66 |
-
|
|
|
|
|
67 |
documents = []
|
68 |
|
69 |
txt_loader = DirectoryLoader(
|
|
|
58 |
|
59 |
|
60 |
|
61 |
+
def langchain_document_loader():
|
62 |
"""
|
63 |
Load documents from the temporary directory (TMP_DIR).
|
64 |
Files can be in txt, pdf, CSV or docx format.
|
65 |
"""
|
66 |
+
current_dir = os.getcwd()
|
67 |
+
TMP_DIR = current_dir
|
68 |
+
|
69 |
documents = []
|
70 |
|
71 |
txt_loader = DirectoryLoader(
|