hzrr commited on
Commit
a4fcf8f
·
1 Parent(s): 6ece583
Files changed (2) hide show
  1. app.py +2 -1
  2. tmp.txt +0 -0
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
- print(c_id)
 
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