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

Update file_processing.py

Browse files
Files changed (1) hide show
  1. file_processing.py +4 -4
file_processing.py CHANGED
@@ -33,13 +33,13 @@ import tempfile
33
  from langchain.docstore.document import Document
34
 
35
  def read_pdf(file_path: str) -> str:
36
- loader= PyMuPDFLoader(file_path)
37
- text = loader.load()
38
  return text
39
 
40
  def read_docx(file_path: str) -> str:
41
- loader = Docx2txtLoader(file_path)
42
- text = loader.load()
43
  return text
44
 
45
  def read_csv(file_path: str) -> str:
 
33
  from langchain.docstore.document import Document
34
 
35
  def read_pdf(file_path: str) -> str:
36
+ loader=PyMuPDFLoader(file_path)
37
+ text=loader.load()
38
  return text
39
 
40
  def read_docx(file_path: str) -> str:
41
+ loader=Docx2txtLoader(file_path)
42
+ text=loader.load()
43
  return text
44
 
45
  def read_csv(file_path: str) -> str: