Spaces:
Build error
Build error
...
Browse files
app.py
CHANGED
|
@@ -41,7 +41,7 @@ def load_model(config_path, pth_path):
|
|
| 41 |
_ = net_g.eval()
|
| 42 |
_ = utils.load_checkpoint(pth_path, net_g)
|
| 43 |
|
| 44 |
-
print("{pth_path}加载成功!")
|
| 45 |
|
| 46 |
def infer(c_id, text):
|
| 47 |
stn_tst = get_text(text, hps_ms)
|
|
@@ -97,7 +97,7 @@ with app:
|
|
| 97 |
with gr.Row():
|
| 98 |
tts_input1 = gr.TextArea(
|
| 99 |
label="请输入文本(仅支持日语)", value="你好,世界!")
|
| 100 |
-
tts_input2 = gr.Dropdown(
|
| 101 |
tts_submit = gr.Button("用文本合成", variant="primary")
|
| 102 |
tts_output2 = gr.Audio(label="Output")
|
| 103 |
# model_submit.click(load_model, [config_path, pth_path])
|
|
|
|
| 41 |
_ = net_g.eval()
|
| 42 |
_ = utils.load_checkpoint(pth_path, net_g)
|
| 43 |
|
| 44 |
+
print(f"{pth_path}加载成功!")
|
| 45 |
|
| 46 |
def infer(c_id, text):
|
| 47 |
stn_tst = get_text(text, hps_ms)
|
|
|
|
| 97 |
with gr.Row():
|
| 98 |
tts_input1 = gr.TextArea(
|
| 99 |
label="请输入文本(仅支持日语)", value="你好,世界!")
|
| 100 |
+
tts_input2 = gr.Dropdown([character_dict.keys], type="value",label="选择角色", optional=False)
|
| 101 |
tts_submit = gr.Button("用文本合成", variant="primary")
|
| 102 |
tts_output2 = gr.Audio(label="Output")
|
| 103 |
# model_submit.click(load_model, [config_path, pth_path])
|