Kabatubare commited on
Commit
36bf420
·
verified ·
1 Parent(s): 8a834c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -33,7 +33,7 @@ def safe_path_join(base_path, path):
33
  def preprocess_audio(audio_file_path, target_sample_rate=16000):
34
  """
35
  Preprocesses the audio file for compatibility with the model's expectations.
36
-
37
  Args:
38
  audio_file_path: Path to the audio file.
39
  target_sample_rate: Desired sample rate compatible with the model.
@@ -78,14 +78,15 @@ def predict_voice(audio_file_path):
78
 
79
  return result
80
 
 
81
  iface = gr.Interface(
82
  fn=predict_voice,
83
  inputs=gr.Audio(label="Upload Audio File", type="filepath"),
84
  outputs=gr.Textbox(label="Prediction"),
85
  title="Voice Authenticity Detection",
86
  description="Detects whether a voice is real or AI-generated. Upload an audio file to see the results.",
87
- theme="huggingface",
88
- enable_queue=True
89
  )
90
 
 
91
  iface.launch(share=True)
 
33
  def preprocess_audio(audio_file_path, target_sample_rate=16000):
34
  """
35
  Preprocesses the audio file for compatibility with the model's expectations.
36
+
37
  Args:
38
  audio_file_path: Path to the audio file.
39
  target_sample_rate: Desired sample rate compatible with the model.
 
78
 
79
  return result
80
 
81
+ # Initialize Gradio interface without the enable_queue parameter
82
  iface = gr.Interface(
83
  fn=predict_voice,
84
  inputs=gr.Audio(label="Upload Audio File", type="filepath"),
85
  outputs=gr.Textbox(label="Prediction"),
86
  title="Voice Authenticity Detection",
87
  description="Detects whether a voice is real or AI-generated. Upload an audio file to see the results.",
88
+ theme="huggingface"
 
89
  )
90
 
91
+ # Launch the Gradio app
92
  iface.launch(share=True)