Spaces:
Runtime error
Runtime error
tomaseo2022
commited on
Commit
•
ecd4ea7
1
Parent(s):
a800ed1
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ def pdf_to_xml(pdf_file):
|
|
9 |
if pdf_file is None:
|
10 |
raise ValueError("No se recibió ningún archivo PDF.")
|
11 |
|
12 |
-
pdf_document = fitz.open(stream=pdf_file
|
13 |
pdf_text = ""
|
14 |
for page in pdf_document:
|
15 |
pdf_text += page.get_text()
|
|
|
9 |
if pdf_file is None:
|
10 |
raise ValueError("No se recibió ningún archivo PDF.")
|
11 |
|
12 |
+
pdf_document = fitz.open(stream=pdf_file, filetype="pdf")
|
13 |
pdf_text = ""
|
14 |
for page in pdf_document:
|
15 |
pdf_text += page.get_text()
|