Update app.py
Browse files
app.py
CHANGED
@@ -2,15 +2,15 @@ import gradio as gr
|
|
2 |
import torchaudio
|
3 |
import torch
|
4 |
from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC
|
5 |
-
from transformers import
|
6 |
from transformers import Wav2Vec2Processor, Wav2Vec2ForSequenceClassification
|
7 |
|
8 |
# Load the models
|
9 |
asr_model = Wav2Vec2ForCTC.from_pretrained("facebook/mms-1b-all")
|
10 |
asr_processor = Wav2Vec2Processor.from_pretrained("facebook/mms-1b-all")
|
11 |
|
12 |
-
tts_model =
|
13 |
-
tts_processor =
|
14 |
|
15 |
lid_model = Wav2Vec2ForSequenceClassification.from_pretrained("facebook/mms-lid-1024")
|
16 |
lid_processor = Wav2Vec2Processor.from_pretrained("facebook/mms-lid-1024")
|
|
|
2 |
import torchaudio
|
3 |
import torch
|
4 |
from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC
|
5 |
+
from transformers import AutoProcessor, AutoModelForSeq2SeqLM
|
6 |
from transformers import Wav2Vec2Processor, Wav2Vec2ForSequenceClassification
|
7 |
|
8 |
# Load the models
|
9 |
asr_model = Wav2Vec2ForCTC.from_pretrained("facebook/mms-1b-all")
|
10 |
asr_processor = Wav2Vec2Processor.from_pretrained("facebook/mms-1b-all")
|
11 |
|
12 |
+
tts_model = AutoModelForSeq2SeqLM.from_pretrained("facebook/mms-tts")
|
13 |
+
tts_processor = AutoProcessor.from_pretrained("facebook/mms-tts")
|
14 |
|
15 |
lid_model = Wav2Vec2ForSequenceClassification.from_pretrained("facebook/mms-lid-1024")
|
16 |
lid_processor = Wav2Vec2Processor.from_pretrained("facebook/mms-lid-1024")
|