marigold334 commited on
Commit
18213da
โ€ข
1 Parent(s): eba6e07

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -20,7 +20,6 @@ class TTS:
20
  self.flowgenerator = Glow_model(n_vocab = 70 , h_c= 192, f_c = 768, f_c_dp = 256, out_c = 80, k_s = 3, k_s_dec = 5, heads=2, layers_enc = 6).to(device) if model_variant != 'ํƒœ์—ฐ' else T_Glow_model().to(device)
21
  self.voicegenerator = GAN_model().to(device)
22
  if model_variant == '๊ฐ๊ธฐ๊ฑธ๋ฆฐ ์€์‹':
23
- name = '1038_eunsik_01'
24
  last_chpt1 = './log/1038_eunsik_01/Glow_TTS_00289602.pt'
25
  elif model_variant == 'KSS':
26
  last_chpt1 = './log/KSS/Glow_TTS_00280641.pt'
@@ -56,7 +55,6 @@ class TTS:
56
  return voice
57
 
58
  def init_session_state():
59
- # Model
60
  if "init_model" not in st.session_state:
61
  st.session_state.init_model = True
62
  st.session_state.model_variant = "ํƒœ์—ฐ"
@@ -67,7 +65,7 @@ def update_model():
67
  st.session_state.TTS = TTS("KSS")
68
  elif st.session_state.model_variant == "๊ฐ๊ธฐ๊ฑธ๋ฆฐ ์€์‹":
69
  st.session_state.TTS = TTS("๊ฐ๊ธฐ๊ฑธ๋ฆฐ ์€์‹")
70
- elif st.seesion_state.model_varaiant == 'ํƒœ์—ฐ':
71
  st.session_state.TTS = TTS("ํƒœ์—ฐ")
72
 
73
  def update_session_state(state_id, state_value):
 
20
  self.flowgenerator = Glow_model(n_vocab = 70 , h_c= 192, f_c = 768, f_c_dp = 256, out_c = 80, k_s = 3, k_s_dec = 5, heads=2, layers_enc = 6).to(device) if model_variant != 'ํƒœ์—ฐ' else T_Glow_model().to(device)
21
  self.voicegenerator = GAN_model().to(device)
22
  if model_variant == '๊ฐ๊ธฐ๊ฑธ๋ฆฐ ์€์‹':
 
23
  last_chpt1 = './log/1038_eunsik_01/Glow_TTS_00289602.pt'
24
  elif model_variant == 'KSS':
25
  last_chpt1 = './log/KSS/Glow_TTS_00280641.pt'
 
55
  return voice
56
 
57
  def init_session_state():
 
58
  if "init_model" not in st.session_state:
59
  st.session_state.init_model = True
60
  st.session_state.model_variant = "ํƒœ์—ฐ"
 
65
  st.session_state.TTS = TTS("KSS")
66
  elif st.session_state.model_variant == "๊ฐ๊ธฐ๊ฑธ๋ฆฐ ์€์‹":
67
  st.session_state.TTS = TTS("๊ฐ๊ธฐ๊ฑธ๋ฆฐ ์€์‹")
68
+ elif st.session_state.model_varaiant == 'ํƒœ์—ฐ':
69
  st.session_state.TTS = TTS("ํƒœ์—ฐ")
70
 
71
  def update_session_state(state_id, state_value):