Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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")
|
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()))
|