sssssungk commited on
Commit
7441b82
·
verified ·
1 Parent(s): a5292a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -126,7 +126,7 @@ def real_fake_check(list_dir, path, model):
126
  probabilities = F.softmax(result, dim=1)
127
  #prob[i]='%.2f'%probabilities[0][1].item()
128
  #prob[i]=round(probabilities[0][1].item(),2)
129
- prob.append(round(probabilities[0][1].item(),2))
130
  predicted_class = 0 if probabilities[0][0] >= THRESHOLD else 1 # 확률값이 기준치보다 크다면 real, 아니면 fake
131
  if predicted_class == 0:
132
  r_cnt += 1
@@ -202,7 +202,7 @@ def main(file_name):
202
  text = convert_wav_to_text(os.path.join(path, i))
203
  text_list.append(text)
204
 
205
-
206
  return rf_check, text_list
207
 
208
  def deepvoice_check(video_file):
 
126
  probabilities = F.softmax(result, dim=1)
127
  #prob[i]='%.2f'%probabilities[0][1].item()
128
  #prob[i]=round(probabilities[0][1].item(),2)
129
+ prob.append(probabilities[0][1].item())
130
  predicted_class = 0 if probabilities[0][0] >= THRESHOLD else 1 # 확률값이 기준치보다 크다면 real, 아니면 fake
131
  if predicted_class == 0:
132
  r_cnt += 1
 
202
  text = convert_wav_to_text(os.path.join(path, i))
203
  text_list.append(text)
204
 
205
+ text_list.append(convert_wav_to_text(audio_file))
206
  return rf_check, text_list
207
 
208
  def deepvoice_check(video_file):