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