cymic commited on
Commit
8b7bfeb
1 Parent(s): b6627c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -12
app.py CHANGED
@@ -117,16 +117,9 @@ def to_symbol_fn(is_symbol_input, input_text, temp_text):
117
  else (temp_text, temp_text)
118
 
119
  def infer2(text_raw, character, language, duration, noise_scale, noise_scale_w, is_symbol):
120
- """
121
- infer
122
- """
123
  return (None, None, None, None)
124
 
125
- def infer(text_raw, character, language, duration, noise_scale, noise_scale_w, is_symbol):
126
- """
127
- infer
128
- """
129
-
130
  # check character & duraction parameter
131
  if language not in languages:
132
  print("Error: No such language\n")
@@ -324,10 +317,10 @@ if __name__ == "__main__":
324
  )
325
 
326
 
327
- btn.click(infer2, inputs=[textbox, char_dropdown, language_dropdown, duration_slider, noise_scale_slider, noise_scale_w_slider, symbol_input],
328
- outputs=[text_output, audio_output, phoneme_output, duration_output], api_name="1")
329
- cus_dur_gn_btn.click(infer_from_phoneme_dur, inputs=[duration_output, char_dropdown, duration_slider, noise_scale_slider, noise_scale_w_slider],
330
- outputs=[phoneme_output, audio_output])#, api_name="2")
331
 
332
 
333
  examples = [['haa\u2193......haa\u2193......haa\u2193......haa\u2193......haa\u2193......haa\u2193......haa\u2193......haa\u2193......haa\u2193......haa\u2193......haa\u2193......haa\u2193......', '29:米浴', '日本語', 1, 0.667, 0.8, True],
 
117
  else (temp_text, temp_text)
118
 
119
  def infer2(text_raw, character, language, duration, noise_scale, noise_scale_w, is_symbol):
 
 
 
120
  return (None, None, None, None)
121
 
122
+ def infer(text_raw, character, language, duration, noise_scale, noise_scale_w, is_symbol):
 
 
 
 
123
  # check character & duraction parameter
124
  if language not in languages:
125
  print("Error: No such language\n")
 
317
  )
318
 
319
 
320
+ btn.click(infer2, inputs=[textbox, char_dropdown, language_dropdown, duration_slider, noise_scale_slider, noise_scale_w_slider, symbol_input],
321
+ outputs=[text_output, audio_output, phoneme_output, duration_output], api_name="1")
322
+ cus_dur_gn_btn.click(infer_from_phoneme_dur, inputs=[duration_output, char_dropdown, duration_slider, noise_scale_slider, noise_scale_w_slider],
323
+ outputs=[phoneme_output, audio_output])#, api_name="2")
324
 
325
 
326
  examples = [['haa\u2193......haa\u2193......haa\u2193......haa\u2193......haa\u2193......haa\u2193......haa\u2193......haa\u2193......haa\u2193......haa\u2193......haa\u2193......haa\u2193......', '29:米浴', '日本語', 1, 0.667, 0.8, True],