mrm8488 commited on
Commit
9ac17bb
β€’
1 Parent(s): 1239b09

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,7 +12,7 @@ def inference(audio):
12
  mel = whisper.log_mel_spectrogram(audio).to(model.device)
13
 
14
  _, probs = model.detect_language(mel)
15
- lang = max(probs, key=probs.get)
16
 
17
  options = whisper.DecodingOptions(fp16 = False)
18
  result = whisper.decode(model, mel, options)
@@ -159,7 +159,7 @@ with block:
159
 
160
  btn = gr.Button("Transcribe")
161
 
162
- lang_str = gr.Textbox(show_label=False)
163
 
164
  text = gr.Textbox(show_label=False)
165
 
 
12
  mel = whisper.log_mel_spectrogram(audio).to(model.device)
13
 
14
  _, probs = model.detect_language(mel)
15
+ lang = max(probs, key=probs.get)
16
 
17
  options = whisper.DecodingOptions(fp16 = False)
18
  result = whisper.decode(model, mel, options)
 
159
 
160
  btn = gr.Button("Transcribe")
161
 
162
+ lang_str = gr.Textbox(show_label=False)
163
 
164
  text = gr.Textbox(show_label=False)
165