XDHDD commited on
Commit
9fd29b1
1 Parent(s): 41c7860

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -43,8 +43,8 @@ def inference(re_im, session, onnx_model, input_names, output_names):
43
  output_audio = torch.istft(output_audio, window, stride, window=hann)
44
  return output_audio.numpy()
45
 
46
- def visualize(hr, lr, recon):
47
- sr = CONFIG.DATA.sr
48
  window_size = 1024
49
  window = np.hanning(window_size)
50
 
@@ -108,7 +108,7 @@ if st.button('Сгенерировать потери'):
108
  output = inference(re_im, session, onnx_model, input_names, output_names)
109
 
110
  st.subheader('3. Визуализация')
111
- fig = visualize(target, lossy_input, output)
112
  st.pyplot(fig)
113
  st.success('Сделано!')
114
  sf.write('target.wav', target, sr)
 
43
  output_audio = torch.istft(output_audio, window, stride, window=hann)
44
  return output_audio.numpy()
45
 
46
+ def visualize(hr, lr, recon, sr):
47
+ sr = sr
48
  window_size = 1024
49
  window = np.hanning(window_size)
50
 
 
108
  output = inference(re_im, session, onnx_model, input_names, output_names)
109
 
110
  st.subheader('3. Визуализация')
111
+ fig = visualize(target, lossy_input, output, sr)
112
  st.pyplot(fig)
113
  st.success('Сделано!')
114
  sf.write('target.wav', target, sr)