MeBai commited on
Commit
cc5ccf1
·
verified ·
1 Parent(s): 376dc4c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import gradio as gr
2
  # from transformers import WhisperProcessor, WhisperForConditionalGeneration
3
  from datasets import load_dataset
4
- from transformers import pipeline
5
 
6
  import torch
7
  # import librosa
@@ -14,7 +14,7 @@ import torch
14
  model_id = "openai/whisper-large-v3-turbo"
15
 
16
  models = AutoModelForSpeechSeq2Seq.from_pretrained(
17
- model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True
18
  )
19
 
20
  model = pipeline("automatic-speech-recognition", model=models, chunk_length_s=30, device=0)
 
1
  import gradio as gr
2
  # from transformers import WhisperProcessor, WhisperForConditionalGeneration
3
  from datasets import load_dataset
4
+ from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
5
 
6
  import torch
7
  # import librosa
 
14
  model_id = "openai/whisper-large-v3-turbo"
15
 
16
  models = AutoModelForSpeechSeq2Seq.from_pretrained(
17
+ model_id, low_cpu_mem_usage=True
18
  )
19
 
20
  model = pipeline("automatic-speech-recognition", model=models, chunk_length_s=30, device=0)