Penality commited on
Commit
b1af2d3
·
verified ·
1 Parent(s): e1e0ee7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -104,8 +104,7 @@ def clean_text(text):
104
 
105
  def extract_text_from_pdf(pdf_file):
106
  """Extract and clean text from the uploaded PDF."""
107
- print("extracting")index = faiss.IndexFlatL2(embedding.shape[1])
108
- print(index, index.ntotal)
109
  try:
110
  with pdfplumber.open(pdf_file) as pdf:
111
  text = " ".join(clean_text(text) for page in pdf.pages if (text := page.extract_text()))
 
104
 
105
  def extract_text_from_pdf(pdf_file):
106
  """Extract and clean text from the uploaded PDF."""
107
+ print("extracting")
 
108
  try:
109
  with pdfplumber.open(pdf_file) as pdf:
110
  text = " ".join(clean_text(text) for page in pdf.pages if (text := page.extract_text()))