roopgoraya commited on
Commit
3157a25
·
verified ·
1 Parent(s): 8955955

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -14,12 +14,12 @@ class MyApp:
14
  self.documents = []
15
  self.embeddings = None
16
  self.index = None
17
- self.load_text_file("Developmental issue of Environmental culture pdf") # Replace with your actual pdf path
18
  self.build_vector_db()
19
 
20
  def load_text_file(self, file_path: str) -> None:
21
  """Extracts text from a pdf and stores it in the app's documents."""
22
- with open(file_path,'D') as file:
23
  text = file.read()
24
  self.documents.append({"content": text})
25
  print("pdf file processed successfully!")
 
14
  self.documents = []
15
  self.embeddings = None
16
  self.index = None
17
+ self.load_text_file("Developmental issue of Environmental culture") # Replace with your actual pdf path
18
  self.build_vector_db()
19
 
20
  def load_text_file(self, file_path: str) -> None:
21
  """Extracts text from a pdf and stores it in the app's documents."""
22
+ with open(file_path,) as file:
23
  text = file.read()
24
  self.documents.append({"content": text})
25
  print("pdf file processed successfully!")