jcvsalinas commited on
Commit
7170e51
·
verified ·
1 Parent(s): 39b88aa

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -138,7 +138,8 @@ with demo:
138
  show_label=True
139
  )
140
  text_output = gr.Textbox(label="Recognized Emotion")
 
141
 
142
  # Automatically call the recognize_emotion function when audio is recorded
143
- audio_input.stop_recording(fn=recognize_emotion, inputs=audio_input, outputs=text_output)
144
  demo.launch(share=True)
 
138
  show_label=True
139
  )
140
  text_output = gr.Textbox(label="Recognized Emotion")
141
+ predict_button = gr.Button("Predict Emotion")
142
 
143
  # Automatically call the recognize_emotion function when audio is recorded
144
+ predict_button.click(recognize_emotion, inputs=audio_input, outputs=text_output)
145
  demo.launch(share=True)