patrickvonplaten commited on
Commit
14aa4ce
1 Parent(s): fe359f8
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -9,6 +9,7 @@ from huggingface_hub import HfApi, login
9
  import tempfile
10
  import re
11
  import pdfminer
 
12
 
13
  print("pdfminer", pdfminer.__version__)
14
  print("pandoc", pypandoc.__version__)
@@ -122,15 +123,15 @@ def convert(*keywords):
122
  os.makedirs(RESULTS_FOLDER)
123
 
124
  result_files = []
125
- for folder in tqdm.tqdm(glob.glob(os.path.join(DOC_FOLDER, "/*"))):
126
  all_files = tqdm.tqdm(glob.glob(f"./{folder}/*"))
127
  num_files += len(all_files)
128
 
129
  for filename in all_files:
130
- # try:
131
- result_files += main(filename)
132
- #except Exception as e:
133
- # print(f"{filename} not working because \n {e}")
134
 
135
  break
136
 
 
9
  import tempfile
10
  import re
11
  import pdfminer
12
+ import time
13
 
14
  print("pdfminer", pdfminer.__version__)
15
  print("pandoc", pypandoc.__version__)
 
123
  os.makedirs(RESULTS_FOLDER)
124
 
125
  result_files = []
126
+ for folder in tqdm.tqdm(glob.glob(os.path.join(DOC_FOLDER, "*"))):
127
  all_files = tqdm.tqdm(glob.glob(f"./{folder}/*"))
128
  num_files += len(all_files)
129
 
130
  for filename in all_files:
131
+ try:
132
+ result_files += main(filename)
133
+ except Exception as e:
134
+ print(f"{filename} not working because \n {e}")
135
 
136
  break
137