robertselvam commited on
Commit
1c283c8
1 Parent(s): 1e824f6

Update dspy_qa.py

Browse files
Files changed (1) hide show
  1. dspy_qa.py +3 -1
dspy_qa.py CHANGED
@@ -4,6 +4,8 @@ import dspy
4
  from dsp.utils import deduplicate
5
  from dspy.retrieve.faiss_rm import FaissRM
6
  from langchain_community.document_loaders import PyPDFLoader
 
 
7
  from langchain_text_splitters import RecursiveCharacterTextSplitter
8
 
9
  # os.environ["AZURE_OPENAI_API_KEY"] = ""
@@ -43,7 +45,7 @@ class DocQA(dspy.Module):
43
 
44
  def load_documents(self, file_path):
45
  print("file_path", file_path)
46
- loader = PyPDFLoader(file_path)
47
  documents = loader.load()
48
  return documents
49
 
 
4
  from dsp.utils import deduplicate
5
  from dspy.retrieve.faiss_rm import FaissRM
6
  from langchain_community.document_loaders import PyPDFLoader
7
+ from langchain_community.document_loaders import CSVLoader
8
+
9
  from langchain_text_splitters import RecursiveCharacterTextSplitter
10
 
11
  # os.environ["AZURE_OPENAI_API_KEY"] = ""
 
45
 
46
  def load_documents(self, file_path):
47
  print("file_path", file_path)
48
+ loader = CSVLoader(file_path)
49
  documents = loader.load()
50
  return documents
51