Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -123,11 +123,12 @@ def predict_and_plot(audio_file, use_ensemble, apply_noise_reduction, segment_du
|
|
123 |
"""Run emotion prediction and generate a waveform plot."""
|
124 |
emotion = predict_emotion(audio_file, use_ensemble, apply_noise_reduction, segment_duration, overlap)
|
125 |
waveform = plot_waveform(audio_file)
|
126 |
-
return emotion
|
|
|
127 |
|
128 |
# Build the enhanced UI using Gradio Blocks
|
129 |
with gr.Blocks(css=".gradio-container {background-color: #f7f7f7; font-family: Arial;}") as demo:
|
130 |
-
|
131 |
gr.Markdown(
|
132 |
"Upload an audio file, and the model will predict the emotion using a wav2vec2 model fine-tuned on IEMOCAP data. "
|
133 |
"The prediction is accompanied by an emoji, and you can also view the audio's waveform. "
|
|
|
123 |
"""Run emotion prediction and generate a waveform plot."""
|
124 |
emotion = predict_emotion(audio_file, use_ensemble, apply_noise_reduction, segment_duration, overlap)
|
125 |
waveform = plot_waveform(audio_file)
|
126 |
+
return emotion # Ensure emoji is included here
|
127 |
+
|
128 |
|
129 |
# Build the enhanced UI using Gradio Blocks
|
130 |
with gr.Blocks(css=".gradio-container {background-color: #f7f7f7; font-family: Arial;}") as demo:
|
131 |
+
gr.Markdown("<h1 style='text-align: center;'>Enhanced Emotion Recognition</h1>")
|
132 |
gr.Markdown(
|
133 |
"Upload an audio file, and the model will predict the emotion using a wav2vec2 model fine-tuned on IEMOCAP data. "
|
134 |
"The prediction is accompanied by an emoji, and you can also view the audio's waveform. "
|