Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -17,38 +17,38 @@ examples = [
|
|
17 |
["Hola, esta es una prueba.","tts_transformer-es-css10"]
|
18 |
]
|
19 |
|
20 |
-
io1 = gr.Interface.load("huggingface/facebook/
|
21 |
|
22 |
-
io2 = gr.Interface.load("huggingface/facebook/
|
23 |
|
24 |
-
io3 = gr.Interface.load("huggingface/facebook/
|
25 |
|
26 |
-
io4 = gr.Interface.load("huggingface/facebook/
|
27 |
|
28 |
-
io5 = gr.Interface.load("huggingface/facebook/
|
29 |
|
30 |
-
io6 = gr.Interface.load("huggingface/facebook/
|
31 |
|
32 |
-
io7 = gr.Interface.load("huggingface/facebook/
|
33 |
|
34 |
-
io8 = gr.Interface.load("huggingface/facebook/
|
35 |
|
36 |
|
37 |
|
38 |
def inference(text,model):
|
39 |
-
if model == "
|
40 |
outtext = io1(text)
|
41 |
-
elif model == "
|
42 |
outtext = io2(text)
|
43 |
-
elif model == "
|
44 |
outtext = io3(text)
|
45 |
-
elif model == "
|
46 |
outtext = io4(text)
|
47 |
-
elif model == "
|
48 |
outtext = io5(text)
|
49 |
-
elif model == "
|
50 |
outtext = io6(text)
|
51 |
-
elif model == "
|
52 |
outtext = io7(text)
|
53 |
else:
|
54 |
outtext = io8(text)
|
@@ -57,11 +57,10 @@ def inference(text,model):
|
|
57 |
|
58 |
gr.Interface(
|
59 |
inference,
|
60 |
-
[gr.inputs.
|
61 |
],
|
62 |
gr.outputs.Audio(label="Output"),
|
63 |
examples=examples,
|
64 |
article=article,
|
65 |
title=title,
|
66 |
-
description=description
|
67 |
-
enable_queue=True).launch()
|
|
|
17 |
["Hola, esta es una prueba.","tts_transformer-es-css10"]
|
18 |
]
|
19 |
|
20 |
+
io1 = gr.Interface.load("huggingface/facebook/xm_transformer_600m-es_en-multi_domain")
|
21 |
|
22 |
+
io2 = gr.Interface.load("huggingface/facebook/xm_transformer_600m-ru_en-multi_domain")
|
23 |
|
24 |
+
io3 = gr.Interface.load("huggingface/facebook/xm_transformer_600m-en_ru-multi_domain")
|
25 |
|
26 |
+
io4 = gr.Interface.load("huggingface/facebook/xm_transformer_600m-en_es-multi_domain")
|
27 |
|
28 |
+
io5 = gr.Interface.load("huggingface/facebook/xm_transformer_600m-en_zh-multi_domain")
|
29 |
|
30 |
+
io6 = gr.Interface.load("huggingface/facebook/xm_transformer_600m-fr_en-multi_domain")
|
31 |
|
32 |
+
io7 = gr.Interface.load("huggingface/facebook/xm_transformer_600m-en_ar-multi_domain")
|
33 |
|
34 |
+
io8 = gr.Interface.load("huggingface/facebook/xm_transformer_600m-en_tr-multi_domain")
|
35 |
|
36 |
|
37 |
|
38 |
def inference(text,model):
|
39 |
+
if model == "xm_transformer_600m-es_en-multi_domain":
|
40 |
outtext = io1(text)
|
41 |
+
elif model == "xm_transformer_600m-ru_en-multi_domain":
|
42 |
outtext = io2(text)
|
43 |
+
elif model == "xm_transformer_600m-en_ru-multi_domain":
|
44 |
outtext = io3(text)
|
45 |
+
elif model == "xm_transformer_600m-en_es-multi_domain":
|
46 |
outtext = io4(text)
|
47 |
+
elif model == "xm_transformer_600m-en_zh-multi_domain":
|
48 |
outtext = io5(text)
|
49 |
+
elif model == "xm_transformer_600m-fr_en-multi_domain":
|
50 |
outtext = io6(text)
|
51 |
+
elif model == "xm_transformer_600m-en_ar-multi_domain":
|
52 |
outtext = io7(text)
|
53 |
else:
|
54 |
outtext = io8(text)
|
|
|
57 |
|
58 |
gr.Interface(
|
59 |
inference,
|
60 |
+
[gr.inputs.Audio(label="Input"),gr.inputs.Dropdown(choices=["xm_transformer_600m-es_en-multi_domain","xm_transformer_600m-ru_en-multi_domain","xm_transformer_600m-en_ru-multi_domain","xm_transformer_600m-en_es-multi_domain","xm_transformer_600m-en_zh-multi_domain","xm_transformer_600m-fr_en-multi_domain","xm_transformer_600m-en_ar-multi_domain","facebook/xm_transformer_600m-en_tr-multi_domain"], type="value", default="xm_transformer_600m-es_en-multi_domain", label="model")
|
61 |
],
|
62 |
gr.outputs.Audio(label="Output"),
|
63 |
examples=examples,
|
64 |
article=article,
|
65 |
title=title,
|
66 |
+
description=description).launch(enable_queue=True)
|
|