XDHDD commited on
Commit
9517048
1 Parent(s): 3ebd123

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -45,10 +45,7 @@ def inference(re_im, session, onnx_model, input_names, output_names):
45
  dtype=np.float32)
46
  for i, _input in enumerate(onnx_model.graph.input)
47
  }
48
- inputs = {input_names[i]: np.zeros([d.dim_value for d in _input.type.tensor_type.shape.dim],
49
- dtype=np.float16)
50
- for i, _input in enumerate(onnx_model.graph.input)
51
- }
52
  output_audio = []
53
  for t in range(re_im.shape[0]):
54
  inputs[input_names[0]] = re_im[t]
@@ -143,8 +140,7 @@ hann = torch.sqrt(torch.hann_window(window))
143
  lossy_input_tensor = torch.tensor(lossy_input)
144
  re_im = torch.stft(lossy_input_tensor, window, stride, window=hann, return_complex=False).permute(1, 0, 2).unsqueeze(
145
  1).numpy().astype(np.float32)
146
- re_im = torch.stft(lossy_input_tensor, window, stride, window=hann, return_complex=False).permute(1, 0, 2).unsqueeze(
147
- 1).numpy().astype(np.float16)
148
 
149
  session, onnx_model, input_names, output_names = load_model(model_ver)
150
 
 
45
  dtype=np.float32)
46
  for i, _input in enumerate(onnx_model.graph.input)
47
  }
48
+
 
 
 
49
  output_audio = []
50
  for t in range(re_im.shape[0]):
51
  inputs[input_names[0]] = re_im[t]
 
140
  lossy_input_tensor = torch.tensor(lossy_input)
141
  re_im = torch.stft(lossy_input_tensor, window, stride, window=hann, return_complex=False).permute(1, 0, 2).unsqueeze(
142
  1).numpy().astype(np.float32)
143
+
 
144
 
145
  session, onnx_model, input_names, output_names = load_model(model_ver)
146