Spaces:
jfforero
/
Runtime error

jfforero commited on
Commit
4204b4c
·
verified ·
1 Parent(s): 670552f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -44,7 +44,7 @@ def predict_emotion_from_audio(wav_filepath):
44
  print("Error predicting emotion:", e)
45
  return None
46
 
47
- # Create a combined function that calls both models
48
  def get_predictions(audio_input):
49
  emotion_prediction = predict_emotion_from_audio(audio_input)
50
  return [emotion_prediction]
@@ -57,7 +57,7 @@ with gr.Blocks() as interface:
57
  with gr.Row():
58
  input_audio = gr.Audio(label="Input Audio", type="filepath")
59
  submit_button = gr.Button("Submit")
60
- output_labels = [gr.Label(num_top_classes=8)]
61
 
62
  # Set the function to be called when the button is clicked
63
  submit_button.click(get_predictions, inputs=input_audio, outputs=output_labels)
 
44
  print("Error predicting emotion:", e)
45
  return None
46
 
47
+ # Predict emotion from audio
48
  def get_predictions(audio_input):
49
  emotion_prediction = predict_emotion_from_audio(audio_input)
50
  return [emotion_prediction]
 
57
  with gr.Row():
58
  input_audio = gr.Audio(label="Input Audio", type="filepath")
59
  submit_button = gr.Button("Submit")
60
+ output_labels = [gr.Label(emotion_prediction)]
61
 
62
  # Set the function to be called when the button is clicked
63
  submit_button.click(get_predictions, inputs=input_audio, outputs=output_labels)