gabboud commited on
Commit
bcc516a
·
1 Parent(s): a9b7d04

fix shared dir creation

Browse files
Files changed (1) hide show
  1. utils/pipelines.py +2 -1
utils/pipelines.py CHANGED
@@ -128,7 +128,8 @@ def generation_with_input_config(input_file, pdb_file, num_batches, num_designs_
128
  try:
129
  if pdb_file is not None:
130
  # I need to do this because uploading files to a HF space stores each file in a separate temp directory so I need to copy them again to the same place.
131
- shared_dir = os.mkdir(f"uploads/{time_stamp}_{session_hash}")
 
132
  copied_config_file = os.path.join(shared_dir, os.path.basename(input_file))
133
  shutil.copy2(input_file, copied_config_file)
134
  copied_pdb_file = os.path.join(shared_dir, os.path.basename(pdb_file))
 
128
  try:
129
  if pdb_file is not None:
130
  # I need to do this because uploading files to a HF space stores each file in a separate temp directory so I need to copy them again to the same place.
131
+ shared_dir = os.path.join("uploads", f"{time_stamp}_{session_hash}")
132
+ os.makedirs(shared_dir)
133
  copied_config_file = os.path.join(shared_dir, os.path.basename(input_file))
134
  shutil.copy2(input_file, copied_config_file)
135
  copied_pdb_file = os.path.join(shared_dir, os.path.basename(pdb_file))