JPLTedCas commited on
Commit
736ba09
1 Parent(s): 2704e98

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -1,15 +1,17 @@
1
  from transformers import pipeline
2
  import gradio as gr
3
  import time
 
4
 
5
  #p = pipeline("automatic-speech-recognition",model="jonatasgrosman/wav2vec2-large-xlsr-53-spanish")
6
 
7
  from transformers import WhisperProcessor, WhisperForConditionalGeneration
8
  from datasets import load_dataset
9
- processor = WhisperProcessor.from_pretrained("openai/whisper-large-v2")
10
- model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-large-v2")
11
- model.config.forced_decoder_ids = None
12
-
 
13
  # load model and processor
14
  #processor = WhisperProcessor.from_pretrained("openai/whisper-large-v2")
15
  #model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-large-v2")
 
1
  from transformers import pipeline
2
  import gradio as gr
3
  import time
4
+ import whisper
5
 
6
  #p = pipeline("automatic-speech-recognition",model="jonatasgrosman/wav2vec2-large-xlsr-53-spanish")
7
 
8
  from transformers import WhisperProcessor, WhisperForConditionalGeneration
9
  from datasets import load_dataset
10
+ #processor = WhisperProcessor.from_pretrained("openai/whisper-large-v2")
11
+ #model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-large-v2")
12
+ #model.config.forced_decoder_ids = None
13
+ model = whisper.load_model("large")
14
+
15
  # load model and processor
16
  #processor = WhisperProcessor.from_pretrained("openai/whisper-large-v2")
17
  #model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-large-v2")