marigold334 commited on
Commit
b318680
1 Parent(s): 87218c5
Files changed (1) hide show
  1. app.py +11 -7
app.py CHANGED
@@ -89,19 +89,23 @@ col1, col2 = st.columns(2)
89
  with col1:
90
  input_text = st.text_input(
91
  "한글로만 입력해주세요",
92
- value = "밥은 먹고다니냐?",
93
  )
94
  with col2:
95
  model_variant = st.selectbox("목소리 선택해주세요", options = ["KSS", "감기걸린 은식"], index = 1)
 
 
 
96
  if model_variant != st.session_state.model_variant:
97
- # Update variant choice
98
- update_session_state("model_variant", model_variant)
99
- # Re-load model
100
- update_model()
101
- st.snow()
102
-
103
  noise_scale = st.slider('noise를 추가합니다.', 0., 2., value = 0.33, step = 0.01)
104
  length_scale = st.slider('속도를 조절합니다.', 0., 2., value = 1., step = 0.01)
 
105
  button_gen = st.button("Generate Voice")
106
  if button_gen == True:
107
  voice = st.session_state.TTS.inference(input_text, noise_scale, length_scale)
 
89
  with col1:
90
  input_text = st.text_input(
91
  "한글로만 입력해주세요",
92
+ value = "밥은 먹고 다녀",
93
  )
94
  with col2:
95
  model_variant = st.selectbox("목소리 선택해주세요", options = ["KSS", "감기걸린 은식"], index = 1)
96
+
97
+ button_change = st.button("Change Vocie")
98
+ if button_change == True:
99
  if model_variant != st.session_state.model_variant:
100
+ # Update variant choice
101
+ update_session_state("model_variant", model_variant)
102
+ # Re-load model
103
+ update_model()
104
+ st.snow()
105
+
106
  noise_scale = st.slider('noise를 추가합니다.', 0., 2., value = 0.33, step = 0.01)
107
  length_scale = st.slider('속도를 조절합니다.', 0., 2., value = 1., step = 0.01)
108
+
109
  button_gen = st.button("Generate Voice")
110
  if button_gen == True:
111
  voice = st.session_state.TTS.inference(input_text, noise_scale, length_scale)