ariG23498 HF Staff commited on
Commit
d65444f
·
verified ·
1 Parent(s): caa74a1

Upload custom_code/17-06-25/Motif-Technologies_Motif-2.6B_0.py with huggingface_hub

Browse files
custom_code/17-06-25/Motif-Technologies_Motif-2.6B_0.py CHANGED
@@ -13,13 +13,15 @@ try:
13
  # for integration of the huggingface model hub
14
  # into the corresponding library =)
15
  except Exception as e:
16
- with open(f'Motif-Technologies_Motif-2.6B_0_exception.txt', 'w') as f:
 
17
  import traceback
18
  traceback.print_exc(file=f)
 
19
  from huggingface_hub import upload_file
20
  upload_file(
21
- path_or_fileobj=f'Motif-Technologies_Motif-2.6B_0_exception.txt',
22
  repo_id='model-metadata/model-code-exception',
23
- path_in_repo=f'17-06-25/Motif-Technologies_Motif-2.6B_0_exception.txt',
24
  repo_type='dataset',
25
  )
 
13
  # for integration of the huggingface model hub
14
  # into the corresponding library =)
15
  except Exception as e:
16
+ exception_file = 'Motif-Technologies_Motif-2.6B_0_exception.txt'
17
+ with open(exception_file, 'w') as f:
18
  import traceback
19
  traceback.print_exc(file=f)
20
+ # Upload exception log to HuggingFace
21
  from huggingface_hub import upload_file
22
  upload_file(
23
+ path_or_fileobj=exception_file,
24
  repo_id='model-metadata/model-code-exception',
25
+ path_in_repo='17-06-25/Motif-Technologies_Motif-2.6B_0_exception.txt',
26
  repo_type='dataset',
27
  )