TheLastBen commited on
Commit
baf009b
1 Parent(s): d232168

Upload 2 files

Browse files
Scripts/mainpaperspacev1.py CHANGED
@@ -422,7 +422,7 @@ def upld(Remove_existing_instance_images, Crop_images, Crop_size, IMAGES_FOLDER_
422
  filename = file['name']
423
  if filename.split(".")[-1]=="txt":
424
  with open(CAPTIONS_DIR+'/'+filename, 'w') as f:
425
- f.write(file['content'].decode())
426
  up=[file for file in uploader.value if filename.split(".")[-1]!="txt"]
427
  if Crop_images:
428
  for file in tqdm(up, bar_format=' |{bar:15}| {n_fmt}/{total_fmt} Uploaded'):
 
422
  filename = file['name']
423
  if filename.split(".")[-1]=="txt":
424
  with open(CAPTIONS_DIR+'/'+filename, 'w') as f:
425
+ f.write(bytes(file['content']).decode())
426
  up=[file for file in uploader.value if filename.split(".")[-1]!="txt"]
427
  if Crop_images:
428
  for file in tqdm(up, bar_format=' |{bar:15}| {n_fmt}/{total_fmt} Uploaded'):
Scripts/mainpaperspacev2.py CHANGED
@@ -469,7 +469,7 @@ def upld(Remove_existing_instance_images, Crop_images, Crop_size, IMAGES_FOLDER_
469
  filename = file['name']
470
  if filename.split(".")[-1]=="txt":
471
  with open(CAPTIONS_DIR+'/'+filename, 'w') as f:
472
- f.write(file['content'].decode())
473
  up=[file for file in uploader.value if filename.split(".")[-1]!="txt"]
474
  if Crop_images:
475
  for file in tqdm(up, bar_format=' |{bar:15}| {n_fmt}/{total_fmt} Uploaded'):
 
469
  filename = file['name']
470
  if filename.split(".")[-1]=="txt":
471
  with open(CAPTIONS_DIR+'/'+filename, 'w') as f:
472
+ f.write(bytes(file['content']).decode())
473
  up=[file for file in uploader.value if filename.split(".")[-1]!="txt"]
474
  if Crop_images:
475
  for file in tqdm(up, bar_format=' |{bar:15}| {n_fmt}/{total_fmt} Uploaded'):