Ahsen Khaliq commited on
Commit
e16e942
1 Parent(s): 426c9cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -12
app.py CHANGED
@@ -11,20 +11,17 @@ article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2109.069
11
  examples = [
12
  ["Hello this is a test run","fastspeech2-en-200_speaker-cv4"],
13
  ["Hello, this is a test run.","tts_transformer-en-200_speaker-cv4"],
14
- ["您好,这是试运行。","tts_transformer-zh-cv7_css10"],
15
  ]
16
 
17
  io1 = gr.Interface.load("huggingface/facebook/fastspeech2-en-200_speaker-cv4")
18
 
19
  io2 = gr.Interface.load("huggingface/facebook/tts_transformer-en-200_speaker-cv4")
20
 
21
- io3 = gr.Interface.load("huggingface/facebook/tts_transformer-zh-cv7_css10")
22
 
23
- io4 = gr.Interface.load("huggingface/facebook/tts_transformer-fr-cv7_css10")
24
 
25
- io5 = gr.Interface.load("huggingface/facebook/tts_transformer-ru-cv7_css10")
26
-
27
- io6 = gr.Interface.load("huggingface/facebook/tts_transformer-tr-cv7")
28
 
29
 
30
 
@@ -36,20 +33,18 @@ def inference(text,model):
36
  outtext = io1(text)
37
  elif model == "tts_transformer-en-200_speaker-cv4":
38
  outtext = io2(text)
39
- elif model == "tts_transformer-zh-cv7_css10":
40
- outtext = io3(text)
41
  elif model == "tts_transformer-fr-cv7_css10":
42
- outtext = io4(text)
43
  elif model == "tts_transformer-ru-cv7_css10":
44
- outtext = io5(text)
45
  else:
46
- outtext = io6(text)
47
  return outtext
48
 
49
 
50
  gr.Interface(
51
  inference,
52
- [gr.inputs.Textbox(label="Input",lines=5),gr.inputs.Dropdown(choices=["fastspeech2-en-200_speaker-cv4","tts_transformer-en-200_speaker-cv4","tts_transformer-zh-cv7_css10","tts_transformer-zh-cv7_css10","tts_transformer-fr-cv7_css10","tts_transformer-ru-cv7_css10"], type="value", default="fastspeech2-en-200_speaker-cv4", label="model")
53
  ],
54
  gr.outputs.Audio(label="Output"),
55
  examples=examples,
 
11
  examples = [
12
  ["Hello this is a test run","fastspeech2-en-200_speaker-cv4"],
13
  ["Hello, this is a test run.","tts_transformer-en-200_speaker-cv4"],
 
14
  ]
15
 
16
  io1 = gr.Interface.load("huggingface/facebook/fastspeech2-en-200_speaker-cv4")
17
 
18
  io2 = gr.Interface.load("huggingface/facebook/tts_transformer-en-200_speaker-cv4")
19
 
20
+ io3 = gr.Interface.load("huggingface/facebook/tts_transformer-fr-cv7_css10")
21
 
22
+ io4 = gr.Interface.load("huggingface/facebook/tts_transformer-ru-cv7_css10")
23
 
24
+ io5 = gr.Interface.load("huggingface/facebook/tts_transformer-tr-cv7")
 
 
25
 
26
 
27
 
 
33
  outtext = io1(text)
34
  elif model == "tts_transformer-en-200_speaker-cv4":
35
  outtext = io2(text)
 
 
36
  elif model == "tts_transformer-fr-cv7_css10":
37
+ outtext = io3(text)
38
  elif model == "tts_transformer-ru-cv7_css10":
39
+ outtext = io4(text)
40
  else:
41
+ outtext = io5(text)
42
  return outtext
43
 
44
 
45
  gr.Interface(
46
  inference,
47
+ [gr.inputs.Textbox(label="Input",lines=5),gr.inputs.Dropdown(choices=["fastspeech2-en-200_speaker-cv4","tts_transformer-en-200_speaker-cv4","tts_transformer-zh-cv7_css10","tts_transformer-fr-cv7_css10","tts_transformer-ru-cv7_css10"], type="value", default="fastspeech2-en-200_speaker-cv4", label="model")
48
  ],
49
  gr.outputs.Audio(label="Output"),
50
  examples=examples,