mitulagr2 commited on
Commit
8b90c15
1 Parent(s): c77fb25
Files changed (1) hide show
  1. app/rag.py +2 -3
app/rag.py CHANGED
@@ -22,7 +22,6 @@ from llama_index.llms.llama_cpp import LlamaCPP
22
  from llama_index.embeddings.fastembed import FastEmbedEmbedding
23
 
24
 
25
-
26
  class ChatPDF:
27
  logging.basicConfig(level=logging.INFO)
28
  logger = logging.getLogger(__name__)
@@ -85,12 +84,12 @@ class ChatPDF:
85
  # Settings.tokenzier = tokenizer
86
  Settings.transformations = [text_parser]
87
 
88
- def ingest(self, pdf_file_path: str):
89
  text_chunks = []
90
  doc_ids = []
91
  nodes = []
92
 
93
- docs = SimpleDirectoryReader(input_dir="files").load_data()
94
 
95
  self.logger.info("enumerating docs")
96
  for doc_idx, doc in enumerate(docs):
 
22
  from llama_index.embeddings.fastembed import FastEmbedEmbedding
23
 
24
 
 
25
  class ChatPDF:
26
  logging.basicConfig(level=logging.INFO)
27
  logger = logging.getLogger(__name__)
 
84
  # Settings.tokenzier = tokenizer
85
  Settings.transformations = [text_parser]
86
 
87
+ def ingest(self, files_dir: str):
88
  text_chunks = []
89
  doc_ids = []
90
  nodes = []
91
 
92
+ docs = SimpleDirectoryReader(input_dir=files_dir).load_data()
93
 
94
  self.logger.info("enumerating docs")
95
  for doc_idx, doc in enumerate(docs):