farrell236 commited on
Commit
c47d74e
1 Parent(s): 686cf88

Update nnunet_predict.py

Browse files
Files changed (1) hide show
  1. nnunet_predict.py +2 -1
nnunet_predict.py CHANGED
@@ -3,6 +3,7 @@ import os
3
  import shutil
4
  import random
5
  # import time
 
6
 
7
  from nnunet.inference.predict import predict_from_folder
8
 
@@ -18,7 +19,7 @@ if __name__ == '__main__':
18
  args = vars(parser.parse_args())
19
 
20
  # Append 8bit random hex string to ensure tmp_folder is unique
21
- args['tmp_folder'] += f'_{str(hex(random.getrandbits(8)))}'
22
 
23
  # Create temp directory
24
  os.mkdir(args['tmp_folder'])
 
3
  import shutil
4
  import random
5
  # import time
6
+ import uuid
7
 
8
  from nnunet.inference.predict import predict_from_folder
9
 
 
19
  args = vars(parser.parse_args())
20
 
21
  # Append 8bit random hex string to ensure tmp_folder is unique
22
+ args['tmp_folder'] += f'_{str(uuid.uuid4().hex)}'
23
 
24
  # Create temp directory
25
  os.mkdir(args['tmp_folder'])