camparchimedes commited on
Commit
53454a4
·
verified ·
1 Parent(s): 7735671

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -28,11 +28,11 @@ model = AutoModelForSpeechSeq2Seq.from_pretrained("NbAiLabBeta/nb-whisper-large-
28
  processor = AutoProcessor.from_pretrained("NbAiLabBeta/nb-whisper-large-semantic")
29
 
30
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
31
- torch_dtype = torch.float32
32
  model.to(device)
33
 
34
  #asr = pipeline("automatic-speech-recognition", model=model, processor=processor.tokenizer, device=device, torch_dtype=torch.float32)
35
- pipe = pipeline("automatic-speech-recognition", model="NbAiLabBeta/nb-whisper-large-semantic")
36
 
37
 
38
  def transcribe_audio(audio_file):
 
28
  processor = AutoProcessor.from_pretrained("NbAiLabBeta/nb-whisper-large-semantic")
29
 
30
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
31
+ #torch_dtype = torch.float32
32
  model.to(device)
33
 
34
  #asr = pipeline("automatic-speech-recognition", model=model, processor=processor.tokenizer, device=device, torch_dtype=torch.float32)
35
+ pipe = pipeline("automatic-speech-recognition", model="NbAiLabBeta/nb-whisper-large-semantic", device=device, torch_dtype=torch.float32)
36
 
37
 
38
  def transcribe_audio(audio_file):