JaesungHuh commited on
Commit
cf435d8
β€’
1 Parent(s): c2e5f66
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -12,7 +12,7 @@ def predict_gender(filepath):
12
  with torch.no_grad():
13
  output = model.forward(audio)
14
  probs = torch.softmax(output, dim=1)
15
- prob_dict = {model.pred2gender[i]: float(prob) for i, prob in enumerate(probs[0])}
16
  return prob_dict
17
 
18
  audio_component = gr.Audio(type='filepath', label='Upload your audio file here')
 
12
  with torch.no_grad():
13
  output = model.forward(audio)
14
  probs = torch.softmax(output, dim=1)
15
+ prob_dict = {'Human ' + model.pred2gender[i]: float(prob) for i, prob in enumerate(probs[0])}
16
  return prob_dict
17
 
18
  audio_component = gr.Audio(type='filepath', label='Upload your audio file here')