unijoh commited on
Commit
0fa99f4
1 Parent(s): 94780f8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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 MMSProcessor, MMSForConditionalGeneration
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 = MMSForConditionalGeneration.from_pretrained("facebook/mms-tts")
13
- tts_processor = MMSProcessor.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")
 
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")