marigold334 commited on
Commit
3ad4727
β€’
1 Parent(s): 752de21

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -21,13 +21,16 @@ class TTS:
21
  if model_variant == '은식':
22
  name = '1038_eunsik_01'
23
  last_chpt1 = './log/1038_eunsik_01/Glow_TTS_00289602.pt'
 
 
24
  check_point = torch.load(last_chpt1, map_location = device)
25
  self.flowgenerator.load_state_dict(check_point['generator'])
26
  self.flowgenerator.decoder.skip()
27
  self.flowgenerator.eval()
28
  if model_variant == '은식':
29
- name = '1038_eunsik_01'
30
- last_chpt2 = './log/1038_eunsik_01/HiFI_GAN_00257000.pt'
 
31
  check_point = torch.load(last_chpt2, map_location = device)
32
  self.voicegenerator.load_state_dict(check_point['gen_model'])
33
  self.voicegenerator.eval()
@@ -89,7 +92,7 @@ st.write(" ")
89
 
90
  mode = "p"
91
  st.markdown(
92
- f"<{mode} style='text-align: left;'><small>This is a demo trained by our vocie.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The voice \"KSS\" is traind 3 times \"은식\" is finetuned from \"KSS\" for 3 times &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; We got this deomoformat from Nix-TTS Interactive Demo</small></{mode}>",
93
  unsafe_allow_html = True
94
  )
95
 
@@ -113,5 +116,6 @@ with col2:
113
  button_gen = st.button("Generate Voice")
114
  if button_gen == True:
115
  generate_voice(input_text)
 
116
 
117
 
 
21
  if model_variant == '은식':
22
  name = '1038_eunsik_01'
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'
26
  check_point = torch.load(last_chpt1, map_location = device)
27
  self.flowgenerator.load_state_dict(check_point['generator'])
28
  self.flowgenerator.decoder.skip()
29
  self.flowgenerator.eval()
30
  if model_variant == '은식':
31
+ last_chpt2 = './log/1038_eunsik_01/HiFI_GAN_00257000.pt'\
32
+ elif model_variant == 'KSS':
33
+ last_chpt1 = './log/KSS/HiFi_GAN_00135000.pt'
34
  check_point = torch.load(last_chpt2, map_location = device)
35
  self.voicegenerator.load_state_dict(check_point['gen_model'])
36
  self.voicegenerator.eval()
 
92
 
93
  mode = "p"
94
  st.markdown(
95
+ f"<{mode} style='text-align: left;'><small>This is a demo trained by our vocie. The voice \"KSS\" is traind by KSS Dataset. \"은식\" which is about 1 hour audio is finetuned from \"KSS\". We got this deomoformat from Nix-TTS Interactive Demo</small></{mode}>",
96
  unsafe_allow_html = True
97
  )
98
 
 
116
  button_gen = st.button("Generate Voice")
117
  if button_gen == True:
118
  generate_voice(input_text)
119
+ st.balloons()
120
 
121