Spaces:
Build error
Build error
Update app.py
Browse files
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):
|