DavidCombei commited on
Commit
50e3d1c
1 Parent(s): a5b0df0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -77,9 +77,9 @@ def process_audio(file_audio):
77
  final_prob = final_model.predict_proba(eval_combined_probs)[:, 1]
78
 
79
  if final_prob < 0.5:
80
- return f"Fake with a confidence of: {final_prob[0]:.4f}"
81
  else:
82
- return f"Real with a confidence of: {final_prob[0]:.4f}"
83
 
84
 
85
  interface = gr.Interface(
@@ -90,4 +90,4 @@ interface = gr.Interface(
90
  description="Upload an audio file to detect whether it is fake or real.",
91
  )
92
 
93
- interface.launch()
 
77
  final_prob = final_model.predict_proba(eval_combined_probs)[:, 1]
78
 
79
  if final_prob < 0.5:
80
+ return f"Fake with a confidence of: {100-final_prob[0] * 100:.2f}"
81
  else:
82
+ return f"Real with a confidence of: {final_prob[0] * 100:.2f}"
83
 
84
 
85
  interface = gr.Interface(
 
90
  description="Upload an audio file to detect whether it is fake or real.",
91
  )
92
 
93
+ interface.launch(share=True)