Diggz10 commited on
Commit
8f88515
·
verified ·
1 Parent(s): f2c3748

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -40,14 +40,13 @@ def predict_emotion(audio_file):
40
 
41
 
42
  # --- Gradio Interface ---
 
43
  iface = gr.Interface(
44
  fn=predict_emotion,
45
  inputs=gr.Audio(sources=["microphone", "upload"], type="filepath", label="Upload Audio or Record with Microphone"),
46
  outputs=gr.Label(num_top_classes=5, label="Emotion Probabilities"),
47
  title="AI Audio Emotion Detector",
48
  description="Upload an audio file or record your voice to detect emotions.",
49
- # THIS IS THE CRITICAL CHANGE TO CREATE A NAMED ENDPOINT
50
- api_name="predict"
51
  )
52
 
53
  # Launch the Gradio app with the API queue enabled
 
40
 
41
 
42
  # --- Gradio Interface ---
43
+ # We have REMOVED the api_name parameter to revert to the default endpoint.
44
  iface = gr.Interface(
45
  fn=predict_emotion,
46
  inputs=gr.Audio(sources=["microphone", "upload"], type="filepath", label="Upload Audio or Record with Microphone"),
47
  outputs=gr.Label(num_top_classes=5, label="Emotion Probabilities"),
48
  title="AI Audio Emotion Detector",
49
  description="Upload an audio file or record your voice to detect emotions.",
 
 
50
  )
51
 
52
  # Launch the Gradio app with the API queue enabled