Kevin676 commited on
Commit
c21e142
·
1 Parent(s): 9565fdc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -13,8 +13,8 @@ title1 = "RWKV-4-Raven-7B-v8-Eng-20230408-ctx4096"
13
  os.environ["RWKV_JIT_ON"] = '1'
14
  os.environ["RWKV_CUDA_ON"] = '1' # if '1' then use CUDA kernel for seq mode (much faster)
15
 
16
- #from TTS.api import TTS
17
- #tts = TTS(model_name="tts_models/multilingual/multi-dataset/your_tts", progress_bar=False, gpu=True)
18
 
19
  from rwkv.model import RWKV
20
  model_path = hf_hub_download(repo_id="BlinkDL/rwkv-4-raven", filename=f"{title1}.pth")
@@ -109,7 +109,7 @@ def evaluate(
109
 
110
  # res1 = ' '.join(str(x) for x in res)
111
 
112
- tts.tts_to_file(res1, speaker_wav = upload, language="en", file_path="output.wav")
113
 
114
  return [res, "output.wav"]
115
 
@@ -135,7 +135,7 @@ g = gr.Interface(
135
  lines=5,
136
  label="Raven Output",
137
  ),
138
- # gr.Audio(label="Audio with Custom Voice"),
139
  ],
140
  title="🥳💬💕 - TalktoAI,随时随地,谈天说地!",
141
  description="🤖 - 让有人文关怀的AI造福每一个人!AI向善,文明璀璨!TalktoAI - Enable the future!",
 
13
  os.environ["RWKV_JIT_ON"] = '1'
14
  os.environ["RWKV_CUDA_ON"] = '1' # if '1' then use CUDA kernel for seq mode (much faster)
15
 
16
+ from TTS.api import TTS
17
+ tts = TTS(model_name="tts_models/multilingual/multi-dataset/your_tts", progress_bar=False, gpu=True)
18
 
19
  from rwkv.model import RWKV
20
  model_path = hf_hub_download(repo_id="BlinkDL/rwkv-4-raven", filename=f"{title1}.pth")
 
109
 
110
  # res1 = ' '.join(str(x) for x in res)
111
 
112
+ tts.tts_to_file(res, speaker_wav = upload, language="en", file_path="output.wav")
113
 
114
  return [res, "output.wav"]
115
 
 
135
  lines=5,
136
  label="Raven Output",
137
  ),
138
+ gr.Audio(label="Audio with Custom Voice"),
139
  ],
140
  title="🥳💬💕 - TalktoAI,随时随地,谈天说地!",
141
  description="🤖 - 让有人文关怀的AI造福每一个人!AI向善,文明璀璨!TalktoAI - Enable the future!",