avfranco commited on
Commit
0f4639b
1 Parent(s): 46af798

removed transforms AutoModelForSpeechSeq2Seq, AutoProcessor

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -11,7 +11,7 @@ def audio_converter(audio_file:str):
11
  return audio_wav_filename
12
 
13
  def asr_transcriber(audio_file):
14
- from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
15
  import torch
16
  import optimum
17
 
@@ -29,7 +29,7 @@ def asr_transcriber(audio_file):
29
  #device_id = "mps"
30
  #torch_dtype = torch.float16
31
  flash = False
32
- ts = True
33
 
34
  #Try to optimize when CPU and float32
35
  model_id = "openai/whisper-tiny"
 
11
  return audio_wav_filename
12
 
13
  def asr_transcriber(audio_file):
14
+ from transformers import pipeline
15
  import torch
16
  import optimum
17
 
 
29
  #device_id = "mps"
30
  #torch_dtype = torch.float16
31
  flash = False
32
+ ts = False
33
 
34
  #Try to optimize when CPU and float32
35
  model_id = "openai/whisper-tiny"