Ahsen Khaliq
commited on
Commit
•
bbcab34
1
Parent(s):
a9d4fe4
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,8 @@ examples = [
|
|
14 |
["Bonjour, ceci est un test.","tts_transformer-fr-cv7_css10"],
|
15 |
["BЗдравствуйте, это пробный запуск.","tts_transformer-ru-cv7_css10"],
|
16 |
["Merhaba, bu bir deneme çalışmasıdır.","tts_transformer-tr-cv7"],
|
17 |
-
|
|
|
18 |
]
|
19 |
|
20 |
io1 = gr.Interface.load("huggingface/facebook/fastspeech2-en-200_speaker-cv4")
|
@@ -27,9 +28,9 @@ io4 = gr.Interface.load("huggingface/facebook/tts_transformer-ru-cv7_css10")
|
|
27 |
|
28 |
io5 = gr.Interface.load("huggingface/facebook/tts_transformer-tr-cv7")
|
29 |
|
|
|
30 |
|
31 |
-
|
32 |
-
|
33 |
|
34 |
|
35 |
def inference(text,model):
|
@@ -41,14 +42,18 @@ def inference(text,model):
|
|
41 |
outtext = io3(text)
|
42 |
elif model == "tts_transformer-ru-cv7_css10":
|
43 |
outtext = io4(text)
|
44 |
-
|
45 |
outtext = io5(text)
|
|
|
|
|
|
|
|
|
46 |
return outtext
|
47 |
|
48 |
|
49 |
gr.Interface(
|
50 |
inference,
|
51 |
-
[gr.inputs.Textbox(label="Input",lines=5),gr.inputs.Dropdown(choices=["fastspeech2-en-200_speaker-cv4","tts_transformer-en-200_speaker-cv4","tts_transformer-tr-cv7","tts_transformer-fr-cv7_css10","tts_transformer-ru-cv7_css10"], type="value", default="fastspeech2-en-200_speaker-cv4", label="model")
|
52 |
],
|
53 |
gr.outputs.Audio(label="Output"),
|
54 |
examples=examples,
|
|
|
14 |
["Bonjour, ceci est un test.","tts_transformer-fr-cv7_css10"],
|
15 |
["BЗдравствуйте, это пробный запуск.","tts_transformer-ru-cv7_css10"],
|
16 |
["Merhaba, bu bir deneme çalışmasıdır.","tts_transformer-tr-cv7"],
|
17 |
+
["Xin chào, đây là một cuộc chạy thử nghiệm.","tts_transformer-vi-cv7"],
|
18 |
+
["مرحبًا ، هذا اختبار تشغيل.","tts_transformer-ar-cv7"]
|
19 |
]
|
20 |
|
21 |
io1 = gr.Interface.load("huggingface/facebook/fastspeech2-en-200_speaker-cv4")
|
|
|
28 |
|
29 |
io5 = gr.Interface.load("huggingface/facebook/tts_transformer-tr-cv7")
|
30 |
|
31 |
+
io6 = gr.Interface.load("huggingface/facebook/tts_transformer-vi-cv7")
|
32 |
|
33 |
+
io7 = gr.Interface.load("huggingface/facebook/tts_transformer-ar-cv7")
|
|
|
34 |
|
35 |
|
36 |
def inference(text,model):
|
|
|
42 |
outtext = io3(text)
|
43 |
elif model == "tts_transformer-ru-cv7_css10":
|
44 |
outtext = io4(text)
|
45 |
+
elif model == "tts_transformer-tr-cv7":
|
46 |
outtext = io5(text)
|
47 |
+
elif model == "tts_transformer-vi-cv7":
|
48 |
+
outtext = io6(text)
|
49 |
+
else:
|
50 |
+
outtext = io7(text)
|
51 |
return outtext
|
52 |
|
53 |
|
54 |
gr.Interface(
|
55 |
inference,
|
56 |
+
[gr.inputs.Textbox(label="Input",lines=5),gr.inputs.Dropdown(choices=["fastspeech2-en-200_speaker-cv4","tts_transformer-en-200_speaker-cv4","tts_transformer-tr-cv7","tts_transformer-fr-cv7_css10","tts_transformer-ru-cv7_css10","tts_transformer-vi-cv7","tts_transformer-ar-cv7"], type="value", default="fastspeech2-en-200_speaker-cv4", label="model")
|
57 |
],
|
58 |
gr.outputs.Audio(label="Output"),
|
59 |
examples=examples,
|