Update app.py
Browse files
app.py
CHANGED
|
@@ -13,9 +13,10 @@ def extract_pdf_text(uploaded_file):
|
|
| 13 |
for page in pdf_reader.pages:
|
| 14 |
page_text = page.extract_text()
|
| 15 |
if page_text:
|
| 16 |
-
text += page_text + "
|
| 17 |
return text
|
| 18 |
|
|
|
|
| 19 |
def extract_docx_text(uploaded_file):
|
| 20 |
# docx2txt.process accepts a path or a file-like object
|
| 21 |
return docx2txt.process(uploaded_file)
|
|
|
|
| 13 |
for page in pdf_reader.pages:
|
| 14 |
page_text = page.extract_text()
|
| 15 |
if page_text:
|
| 16 |
+
text += page_text + " "
|
| 17 |
return text
|
| 18 |
|
| 19 |
+
|
| 20 |
def extract_docx_text(uploaded_file):
|
| 21 |
# docx2txt.process accepts a path or a file-like object
|
| 22 |
return docx2txt.process(uploaded_file)
|