ariG23498 HF Staff commited on
Commit
bb34738
·
verified ·
1 Parent(s): a3c18a9

Upload zai-org_GLM-ASR-Nano-2512_1.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. zai-org_GLM-ASR-Nano-2512_1.py +8 -4
zai-org_GLM-ASR-Nano-2512_1.py CHANGED
@@ -21,8 +21,10 @@
21
 
22
  try:
23
  # Load model directly
24
- from transformers import AutoModelForCausalLM
25
- model = AutoModelForCausalLM.from_pretrained("zai-org/GLM-ASR-Nano-2512", trust_remote_code=True, dtype="auto")
 
 
26
  with open('zai-org_GLM-ASR-Nano-2512_1.txt', 'w', encoding='utf-8') as f:
27
  f.write('Everything was good in zai-org_GLM-ASR-Nano-2512_1.txt')
28
  except Exception as e:
@@ -38,8 +40,10 @@ except Exception as e:
38
  import traceback
39
  f.write('''```CODE:
40
  # Load model directly
41
- from transformers import AutoModelForCausalLM
42
- model = AutoModelForCausalLM.from_pretrained("zai-org/GLM-ASR-Nano-2512", trust_remote_code=True, dtype="auto")
 
 
43
  ```
44
 
45
  ERROR:
 
21
 
22
  try:
23
  # Load model directly
24
+ from transformers import AutoProcessor, AutoModelForSeq2SeqLM
25
+
26
+ processor = AutoProcessor.from_pretrained("zai-org/GLM-ASR-Nano-2512")
27
+ model = AutoModelForSeq2SeqLM.from_pretrained("zai-org/GLM-ASR-Nano-2512")
28
  with open('zai-org_GLM-ASR-Nano-2512_1.txt', 'w', encoding='utf-8') as f:
29
  f.write('Everything was good in zai-org_GLM-ASR-Nano-2512_1.txt')
30
  except Exception as e:
 
40
  import traceback
41
  f.write('''```CODE:
42
  # Load model directly
43
+ from transformers import AutoProcessor, AutoModelForSeq2SeqLM
44
+
45
+ processor = AutoProcessor.from_pretrained("zai-org/GLM-ASR-Nano-2512")
46
+ model = AutoModelForSeq2SeqLM.from_pretrained("zai-org/GLM-ASR-Nano-2512")
47
  ```
48
 
49
  ERROR: