Spaces:
Build error
Build error
...
Browse files
app.py
CHANGED
@@ -45,8 +45,8 @@ def load_model(config_path, pth_path):
|
|
45 |
|
46 |
print(f"{pth_path}ε θ½½ζε!")
|
47 |
|
48 |
-
def infer(text):
|
49 |
-
|
50 |
stn_tst = get_text(text, hps)
|
51 |
with torch.no_grad():
|
52 |
x_tst = stn_tst.to(dev).unsqueeze(0)
|
@@ -87,7 +87,7 @@ with app:
|
|
87 |
tts_submit = gr.Button("η¨ζζ¬εζ", variant="primary")
|
88 |
tts_output2 = gr.Audio(label="Output")
|
89 |
# model_submit.click(load_model, [config_path, pth_path])
|
90 |
-
tts_submit.click(infer, [tts_input1], [tts_output2])
|
91 |
gr.HTML("""
|
92 |
<div style="text-align:center">
|
93 |
<h4 class="h-sign" style="font-size: 12px;">
|
|
|
45 |
|
46 |
print(f"{pth_path}ε θ½½ζε!")
|
47 |
|
48 |
+
def infer(c_id, text):
|
49 |
+
|
50 |
stn_tst = get_text(text, hps)
|
51 |
with torch.no_grad():
|
52 |
x_tst = stn_tst.to(dev).unsqueeze(0)
|
|
|
87 |
tts_submit = gr.Button("η¨ζζ¬εζ", variant="primary")
|
88 |
tts_output2 = gr.Audio(label="Output")
|
89 |
# model_submit.click(load_model, [config_path, pth_path])
|
90 |
+
tts_submit.click(infer, [c_id, tts_input1], [tts_output2])
|
91 |
gr.HTML("""
|
92 |
<div style="text-align:center">
|
93 |
<h4 class="h-sign" style="font-size: 12px;">
|