eaglelandsonce commited on
Commit
ce562bc
·
1 Parent(s): 00665aa

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +3 -0
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