Spaces:
Runtime error
Runtime error
Update app.py
#18
by
marigold334
- opened
app.py
CHANGED
@@ -35,6 +35,7 @@ class TTS:
|
|
35 |
self.voicegenerator.load_state_dict(check_point['gen_model'])
|
36 |
self.voicegenerator.eval()
|
37 |
self.voicegenerator.remove_weight_norm()
|
|
|
38 |
|
39 |
def inference(self, input_text, noise_scale = 0.667, length_scale = 1.0):
|
40 |
filters = '([.,!?])'
|
@@ -97,11 +98,12 @@ with col2:
|
|
97 |
button_change = st.button("Change Vocie")
|
98 |
if button_change == True:
|
99 |
if model_variant != st.session_state.model_variant:
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
|
|
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)
|
|
|
35 |
self.voicegenerator.load_state_dict(check_point['gen_model'])
|
36 |
self.voicegenerator.eval()
|
37 |
self.voicegenerator.remove_weight_norm()
|
38 |
+
self.finish = True
|
39 |
|
40 |
def inference(self, input_text, noise_scale = 0.667, length_scale = 1.0):
|
41 |
filters = '([.,!?])'
|
|
|
98 |
button_change = st.button("Change Vocie")
|
99 |
if button_change == True:
|
100 |
if model_variant != st.session_state.model_variant:
|
101 |
+
# Update variant choice
|
102 |
+
update_session_state("model_variant", model_variant)
|
103 |
+
# Re-load model
|
104 |
+
with st.spinner('Speaker updating'):
|
105 |
+
update_model()
|
106 |
+
st.success('Done!', icon="✅")
|
107 |
|
108 |
noise_scale = st.slider('noise를 추가합니다.', 0., 2., value = 0.33, step = 0.01)
|
109 |
length_scale = st.slider('속도를 조절합니다.', 0., 2., value = 1., step = 0.01)
|