XDHDD commited on
Commit
4bf0414
1 Parent(s): 71c5dd6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -26,7 +26,7 @@ from speechmos import plcmos
26
 
27
  import speech_recognition as speech_r
28
  from jiwer import wer
29
-
30
 
31
  @st.cache
32
  def load_model(model):
@@ -140,10 +140,10 @@ lossy_input_tensor = torch.tensor(lossy_input)
140
  re_im = torch.stft(lossy_input_tensor, window, stride, window=hann, return_complex=False).permute(1, 0, 2).unsqueeze(
141
  1).numpy().astype(np.float32)
142
 
143
-
144
  session, onnx_model, input_names, output_names = load_model(model_ver)
145
 
146
  if st.button('Сгенерировать потери'):
 
147
  with st.spinner('Ожидайте...'):
148
  output = inference(re_im, session, onnx_model, input_names, output_names)
149
 
@@ -374,5 +374,5 @@ if st.button('Сгенерировать потери'):
374
  df_1['WER'] = WER_mass
375
 
376
  st.dataframe(df_1)
377
-
378
 
 
26
 
27
  import speech_recognition as speech_r
28
  from jiwer import wer
29
+ import time
30
 
31
  @st.cache
32
  def load_model(model):
 
140
  re_im = torch.stft(lossy_input_tensor, window, stride, window=hann, return_complex=False).permute(1, 0, 2).unsqueeze(
141
  1).numpy().astype(np.float32)
142
 
 
143
  session, onnx_model, input_names, output_names = load_model(model_ver)
144
 
145
  if st.button('Сгенерировать потери'):
146
+ start_time = time.time()
147
  with st.spinner('Ожидайте...'):
148
  output = inference(re_im, session, onnx_model, input_names, output_names)
149
 
 
374
  df_1['WER'] = WER_mass
375
 
376
  st.dataframe(df_1)
377
+ print("--- %s seconds ---" % (time.time() - start_time))
378