MrPotato commited on
Commit
96863db
·
1 Parent(s): 3c5bd4c

Initial commit

Browse files
Files changed (1) hide show
  1. docbank.py +3 -2
docbank.py CHANGED
@@ -222,7 +222,7 @@ class Docbank(datasets.GeneratorBasedBuilder):
222
  # print(filepath)
223
  key = 0
224
  for f_fp_txt, f_fp_img in filepath:
225
- #print(f)
226
  f_id = key
227
  #f_fp_txt = f['filepath_txt']
228
  #f_fp_img = f['filepath_img']
@@ -237,9 +237,10 @@ class Docbank(datasets.GeneratorBasedBuilder):
237
 
238
 
239
  try:
240
- with open(f_fp_txt, newline='', encoding='utf-8') as csvfile:
241
  reader = csv.reader(csvfile, delimiter=',')
242
  for row in reader:
 
243
  # normalized_bbox = normalize_bbox(row[1:5], size)
244
  normalized_bbox = [int(x) for x in row[1:5]]
245
  tokens.append(row[0])
 
222
  # print(filepath)
223
  key = 0
224
  for f_fp_txt, f_fp_img in filepath:
225
+ #print(f_fp_txt)
226
  f_id = key
227
  #f_fp_txt = f['filepath_txt']
228
  #f_fp_img = f['filepath_img']
 
237
 
238
 
239
  try:
240
+ with open(f_fp_txt, encoding='utf-8') as csvfile:
241
  reader = csv.reader(csvfile, delimiter=',')
242
  for row in reader:
243
+ #print(row)
244
  # normalized_bbox = normalize_bbox(row[1:5], size)
245
  normalized_bbox = [int(x) for x in row[1:5]]
246
  tokens.append(row[0])