Commit
·
ce562bc
1
Parent(s):
00665aa
Update utils.py
Browse files
utils.py
CHANGED
@@ -19,6 +19,9 @@ def load_document(file):
|
|
19 |
elif extension == '.txt':
|
20 |
from langchain.document_loaders import TextLoader
|
21 |
loader = TextLoader(file)
|
|
|
|
|
|
|
22 |
else:
|
23 |
print('Document format is not supported!')
|
24 |
return None
|
|
|
19 |
elif extension == '.txt':
|
20 |
from langchain.document_loaders import TextLoader
|
21 |
loader = TextLoader(file)
|
22 |
+
elif extension == '.csv':
|
23 |
+
from langchain.document_loaders import CSVLoader
|
24 |
+
loader = CSVLoader(file)
|
25 |
else:
|
26 |
print('Document format is not supported!')
|
27 |
return None
|