aimal-khan commited on
Commit
a5000d4
·
verified ·
1 Parent(s): b3c5160

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -25,12 +25,14 @@ def convert(file, out_format):
25
  # Create a temporary file to save DocTags
26
  with tempfile.NamedTemporaryFile(delete=False, suffix=".doctags") as temp_file:
27
  temp_filename = temp_file.name
28
-
 
29
  # Save the document as DocTags (JSON-like format)
30
  doc.document.save_as_doctags(temp_filename)
31
 
32
  # Check if the file is empty
33
  if os.path.getsize(temp_filename) > 0:
 
34
  # Read the saved DocTags file back into memory
35
  with open(temp_filename, 'r') as file:
36
  doctags = json.load(file)
 
25
  # Create a temporary file to save DocTags
26
  with tempfile.NamedTemporaryFile(delete=False, suffix=".doctags") as temp_file:
27
  temp_filename = temp_file.name
28
+ print(f"Temporary file created: {temp_filename}")
29
+
30
  # Save the document as DocTags (JSON-like format)
31
  doc.document.save_as_doctags(temp_filename)
32
 
33
  # Check if the file is empty
34
  if os.path.getsize(temp_filename) > 0:
35
+ print(f"File size: {os.path.getsize(temp_filename)} bytes")
36
  # Read the saved DocTags file back into memory
37
  with open(temp_filename, 'r') as file:
38
  doctags = json.load(file)