Krylova commited on
Commit
b8c39bd
1 Parent(s): c25f802

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -1,9 +1,15 @@
 
 
 
 
 
 
1
  import gradio as gr
2
  import numpy as np
3
  import torch
4
  from datasets import load_dataset
5
 
6
- from transformers import SpeechT5ForTextToSpeech, SpeechT5HifiGan, SpeechT5Processor, pipeline, WhisperProcessor
7
 
8
  device = "cuda:0" if torch.cuda.is_available() else "cpu"
9
 
@@ -16,7 +22,6 @@ processor = WhisperProcessor.from_pretrained(
16
  translator_en = pipeline("translation", model="Helsinki-NLP/opus-mt-mul-en")
17
  translator_ru = pipeline("translation", model="Helsinki-NLP/opus-mt-en-ru")
18
 
19
- from transformers import VitsModel, VitsTokenizer
20
 
21
  model = VitsModel.from_pretrained("facebook/mms-tts-rus")
22
  tokenizer = VitsTokenizer.from_pretrained("facebook/mms-tts-rus")
 
1
+ """ML_task3.ipynb
2
+ Automatically generated by Colaboratory.
3
+ Original file is located at
4
+ https://colab.research.google.com/drive/1DfK6fjkAd9RjVx3MUGfDtAOulvEenk0E?authuser=0#scrollTo=x0BqFNWue3V8
5
+ """
6
+
7
  import gradio as gr
8
  import numpy as np
9
  import torch
10
  from datasets import load_dataset
11
 
12
+ from transformers import SpeechT5ForTextToSpeech, SpeechT5HifiGan, SpeechT5Processor, pipeline, WhisperProcessor, VitsModel, VitsTokenizer
13
 
14
  device = "cuda:0" if torch.cuda.is_available() else "cpu"
15
 
 
22
  translator_en = pipeline("translation", model="Helsinki-NLP/opus-mt-mul-en")
23
  translator_ru = pipeline("translation", model="Helsinki-NLP/opus-mt-en-ru")
24
 
 
25
 
26
  model = VitsModel.from_pretrained("facebook/mms-tts-rus")
27
  tokenizer = VitsTokenizer.from_pretrained("facebook/mms-tts-rus")