akhaliq HF staff commited on
Commit
dfece40
1 Parent(s): 75a7ba6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -14,9 +14,8 @@ def inference(audio):
14
  mel = whisper.log_mel_spectrogram(audio).to(model.device)
15
 
16
  _, probs = model.detect_language(mel)
17
- print(f"Detected language: {max(probs, key=probs.get)}")
18
 
19
- options = whisper.DecodingOptions()
20
  result = whisper.decode(model, mel, options)
21
 
22
  print(result.text)
 
14
  mel = whisper.log_mel_spectrogram(audio).to(model.device)
15
 
16
  _, probs = model.detect_language(mel)
 
17
 
18
+ options = whisper.DecodingOptions(fp16 = False)
19
  result = whisper.decode(model, mel, options)
20
 
21
  print(result.text)