BassWow commited on
Commit
3c1525c
·
1 Parent(s): be632c4
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -11,7 +11,7 @@ def speech_to_text(tmp_filename, model_size):
11
  audio = whisper.pad_or_trim(audio)
12
 
13
  # make log-Mel spectrogram and move to the same device as the model
14
- mel = whisper.log_mel_spectrogram(audio).to(model.device)
15
 
16
  # detect the spoken language
17
  _, probs = model.detect_language(mel)
@@ -27,7 +27,7 @@ def speech_to_text(tmp_filename, model_size):
27
 
28
 
29
  gr.Interface(
30
- theme="dark",
31
  title="Whisper by OpenAI",
32
  thumbnail="https://cdn.openai.com/whisper/asr-summary-of-model-architecture-desktop.svg",
33
  css="""
 
11
  audio = whisper.pad_or_trim(audio)
12
 
13
  # make log-Mel spectrogram and move to the same device as the model
14
+ mel = whisper.log_mel_spectrogram(audio)
15
 
16
  # detect the spoken language
17
  _, probs = model.detect_language(mel)
 
27
 
28
 
29
  gr.Interface(
30
+
31
  title="Whisper by OpenAI",
32
  thumbnail="https://cdn.openai.com/whisper/asr-summary-of-model-architecture-desktop.svg",
33
  css="""