engrrifatullah commited on
Commit
9ccb76f
·
verified ·
1 Parent(s): 70ef34a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -32,7 +32,7 @@ def download_pdf_from_drive(file_id):
32
  # Function to extract text from PDF
33
  def extract_text_from_pdf(pdf_file):
34
  with pdfplumber.open(pdf_file) as pdf:
35
- return ' '.join(page.extract_text() for page in pdf.pages)
36
 
37
  # Function to create embeddings and store them in FAISS
38
  def create_embeddings(text):
 
32
  # Function to extract text from PDF
33
  def extract_text_from_pdf(pdf_file):
34
  with pdfplumber.open(pdf_file) as pdf:
35
+ return ' '.join(page.extract_text() for page in pdf.pages if page.extract_text())
36
 
37
  # Function to create embeddings and store them in FAISS
38
  def create_embeddings(text):