Sk4467 commited on
Commit
2588872
·
verified ·
1 Parent(s): 52b8ef2

Update file_processing.py

Browse files
Files changed (1) hide show
  1. file_processing.py +4 -4
file_processing.py CHANGED
@@ -43,12 +43,12 @@ def read_docx(file_path: str) -> str:
43
  return text
44
 
45
  def read_csv(file_path: str) -> str:
46
- loader = CSVLoader(file_path)
47
- data = loader.load()
48
  return data
49
  def read_txt(file_path: str) -> str:
50
- loader = TextLoader(file_path)
51
- text = loader.load()
52
  return text
53
 
54
  async def load_documents(file: UploadFile) -> List[Document]:
 
43
  return text
44
 
45
  def read_csv(file_path: str) -> str:
46
+ loader=CSVLoader(file_path)
47
+ data=loader.load()
48
  return data
49
  def read_txt(file_path: str) -> str:
50
+ loader=TextLoader(file_path)
51
+ text=loader.load()
52
  return text
53
 
54
  async def load_documents(file: UploadFile) -> List[Document]: