Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -39,8 +39,8 @@ def text_extraction(element):
|
|
| 39 |
def read_pdf(pdf_path):
|
| 40 |
|
| 41 |
# Use pdf_path.name to get the file name from the gr.File object
|
| 42 |
-
|
| 43 |
-
|
| 44 |
|
| 45 |
|
| 46 |
|
|
|
|
| 39 |
def read_pdf(pdf_path):
|
| 40 |
|
| 41 |
# Use pdf_path.name to get the file name from the gr.File object
|
| 42 |
+
with open(pdf_path.name, 'rb') as pdfFileObj:
|
| 43 |
+
pdfReaded = PyPDF2.PdfReader(pdfFileObj)
|
| 44 |
|
| 45 |
|
| 46 |
|