ariG23498 HF Staff commited on
Commit
edbd493
·
verified ·
1 Parent(s): 16074a8

Upload Hunyuan-A13B-Instruct_1.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. Hunyuan-A13B-Instruct_1.py +5 -5
Hunyuan-A13B-Instruct_1.py CHANGED
@@ -10,17 +10,17 @@ try:
10
  # Load model directly
11
  from transformers import AutoModelForCausalLM
12
  model = AutoModelForCausalLM.from_pretrained("tencent/Hunyuan-A13B-Instruct", trust_remote_code=True)
13
- with open('tencent_Hunyuan-A13B-Instruct_1.txt', 'w') as f:
14
- f.write('Everything was good in tencent_Hunyuan-A13B-Instruct_1')
15
  except Exception as e:
16
- with open('tencent_Hunyuan-A13B-Instruct_1.txt', 'w') as f:
17
  import traceback
18
  traceback.print_exc(file=f)
19
  finally:
20
  from huggingface_hub import upload_file
21
  upload_file(
22
- path_or_fileobj='tencent_Hunyuan-A13B-Instruct_1.txt',
23
  repo_id='model-metadata/custom_code_execution_files',
24
- path_in_repo='tencent_Hunyuan-A13B-Instruct_1.txt',
25
  repo_type='dataset',
26
  )
 
10
  # Load model directly
11
  from transformers import AutoModelForCausalLM
12
  model = AutoModelForCausalLM.from_pretrained("tencent/Hunyuan-A13B-Instruct", trust_remote_code=True)
13
+ with open('Hunyuan-A13B-Instruct_1.txt', 'w') as f:
14
+ f.write('Everything was good in Hunyuan-A13B-Instruct_1')
15
  except Exception as e:
16
+ with open('Hunyuan-A13B-Instruct_1.txt', 'w') as f:
17
  import traceback
18
  traceback.print_exc(file=f)
19
  finally:
20
  from huggingface_hub import upload_file
21
  upload_file(
22
+ path_or_fileobj='Hunyuan-A13B-Instruct_1.txt',
23
  repo_id='model-metadata/custom_code_execution_files',
24
+ path_in_repo='Hunyuan-A13B-Instruct_1.txt',
25
  repo_type='dataset',
26
  )