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

Upload 2 files

Browse files
Scripts/mainpaperspacev1.py CHANGED
@@ -423,7 +423,7 @@ def upld(Remove_existing_instance_images, Crop_images, Crop_size, IMAGES_FOLDER_
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'):
429
  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 not file['name'].endswith('.txt')]
427
  if Crop_images:
428
  for file in tqdm(up, bar_format=' |{bar:15}| {n_fmt}/{total_fmt} Uploaded'):
429
  filename = file['name']
Scripts/mainpaperspacev2.py CHANGED
@@ -470,7 +470,7 @@ def upld(Remove_existing_instance_images, Crop_images, Crop_size, IMAGES_FOLDER_
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'):
476
  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 not file['name'].endswith('.txt')]
474
  if Crop_images:
475
  for file in tqdm(up, bar_format=' |{bar:15}| {n_fmt}/{total_fmt} Uploaded'):
476
  filename = file['name']