Spaces:
Runtime error
Runtime error
Vaibhav Srivastav
commited on
Commit
Β·
17a49e1
1
Parent(s):
64ad696
reverting from AutoProcessor to Wav2Vec2Processor
Browse files
app.py
CHANGED
|
@@ -3,12 +3,12 @@ import librosa
|
|
| 3 |
import torch
|
| 4 |
import gradio as gr
|
| 5 |
from pyctcdecode import build_ctcdecoder
|
| 6 |
-
from transformers import
|
| 7 |
|
| 8 |
nltk.download("punkt")
|
| 9 |
|
| 10 |
def return_processor_and_model(model_name):
|
| 11 |
-
return
|
| 12 |
|
| 13 |
def load_and_fix_data(input_file):
|
| 14 |
#read the file
|
|
|
|
| 3 |
import torch
|
| 4 |
import gradio as gr
|
| 5 |
from pyctcdecode import build_ctcdecoder
|
| 6 |
+
from transformers import Wav2Vec2Processor, AutoModelForCTC
|
| 7 |
|
| 8 |
nltk.download("punkt")
|
| 9 |
|
| 10 |
def return_processor_and_model(model_name):
|
| 11 |
+
return Wav2Vec2Processor.from_pretrained(model_name), AutoModelForCTC.from_pretrained(model_name)
|
| 12 |
|
| 13 |
def load_and_fix_data(input_file):
|
| 14 |
#read the file
|