Spaces:
Running
Running
Upload app.py
Browse files
app.py
CHANGED
|
@@ -461,13 +461,12 @@ history=[
|
|
| 461 |
]
|
| 462 |
|
| 463 |
def get_pdf_text(pdf_docs):
|
| 464 |
-
text
|
| 465 |
-
for pdf in pdf_docs:
|
| 466 |
-
pdf_reader
|
| 467 |
-
for
|
| 468 |
-
|
| 469 |
-
|
| 470 |
-
return text
|
| 471 |
|
| 472 |
def get_text_chunks(text):
|
| 473 |
text_splitter = RecursiveCharacterTextSplitter(chunk_size=10000, chunk_overlap=1000)
|
|
|
|
| 461 |
]
|
| 462 |
|
| 463 |
def get_pdf_text(pdf_docs):
|
| 464 |
+
text=""
|
| 465 |
+
for pdf in pdf_docs:
|
| 466 |
+
pdf_reader= PdfReader(pdf)
|
| 467 |
+
for page in pdf_reader.pages:
|
| 468 |
+
text+= page.extract_text()
|
| 469 |
+
return text
|
|
|
|
| 470 |
|
| 471 |
def get_text_chunks(text):
|
| 472 |
text_splitter = RecursiveCharacterTextSplitter(chunk_size=10000, chunk_overlap=1000)
|