tomaseo2022 commited on
Commit
f748a22
1 Parent(s): c5853b7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -20,9 +20,9 @@ def pdf_to_xml(pdf_file):
20
  if len(pdf_text) > max_chars:
21
  pdf_text = pdf_text[:max_chars]
22
 
23
- # Crear un archivo temporal para almacenar el texto
24
  temp_dir = tempfile.mkdtemp()
25
- temp_file_path = os.path.join(temp_dir, "converted_text.txt")
26
  with open(temp_file_path, "w") as temp_file:
27
  temp_file.write(pdf_text)
28
 
 
20
  if len(pdf_text) > max_chars:
21
  pdf_text = pdf_text[:max_chars]
22
 
23
+ # Crear un archivo temporal con extensión .xml para almacenar el texto
24
  temp_dir = tempfile.mkdtemp()
25
+ temp_file_path = os.path.join(temp_dir, "converted_text.xml")
26
  with open(temp_file_path, "w") as temp_file:
27
  temp_file.write(pdf_text)
28