Spaces:
Running
on
Zero
Running
on
Zero
removed transforms AutoModelForSpeechSeq2Seq, AutoProcessor
Browse files
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
|
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 =
|
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"
|