Spaces:
Build error
Build error
...
Browse files
app.py
CHANGED
@@ -48,7 +48,8 @@ def load_model(config_path, pth_path):
|
|
48 |
def infer(c_id, text):
|
49 |
"""if int(c_id) not in list(range[1, 14]):
|
50 |
raise gr.Error("角色id超出范围!")"""
|
51 |
-
|
|
|
52 |
stn_tst = get_text(text, hps)
|
53 |
with torch.no_grad():
|
54 |
x_tst = stn_tst.to(dev).unsqueeze(0)
|
|
|
48 |
def infer(c_id, text):
|
49 |
"""if int(c_id) not in list(range[1, 14]):
|
50 |
raise gr.Error("角色id超出范围!")"""
|
51 |
+
with open("tmp.txt", "w") as fp:
|
52 |
+
fp.write(c_id)
|
53 |
stn_tst = get_text(text, hps)
|
54 |
with torch.no_grad():
|
55 |
x_tst = stn_tst.to(dev).unsqueeze(0)
|
tmp.txt
ADDED
File without changes
|