ariG23498 HF Staff commited on
Commit
85b87ce
·
verified ·
1 Parent(s): 9f0a91c

Upload openai_whisper-large-v3_0.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. openai_whisper-large-v3_0.py +6 -0
openai_whisper-large-v3_0.py CHANGED
@@ -16,6 +16,12 @@ try:
16
  from transformers import pipeline
17
 
18
  pipe = pipeline("automatic-speech-recognition", model="openai/whisper-large-v3")
 
 
 
 
 
 
19
  with open('openai_whisper-large-v3_0.txt', 'w') as f:
20
  f.write('Everything was good in openai_whisper-large-v3_0.txt')
21
  except Exception as e:
 
16
  from transformers import pipeline
17
 
18
  pipe = pipeline("automatic-speech-recognition", model="openai/whisper-large-v3")
19
+
20
+ # Load model directly
21
+ from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq
22
+
23
+ processor = AutoProcessor.from_pretrained("openai/whisper-large-v3")
24
+ model = AutoModelForSpeechSeq2Seq.from_pretrained("openai/whisper-large-v3")
25
  with open('openai_whisper-large-v3_0.txt', 'w') as f:
26
  f.write('Everything was good in openai_whisper-large-v3_0.txt')
27
  except Exception as e: