Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -53,7 +53,7 @@ if st.button('Predict Emotion and Recommend Songs'):
|
|
53 |
if lyrics and all(audio_features):
|
54 |
# Process the lyrics
|
55 |
sequence = tokenizer.texts_to_sequences([lyrics])
|
56 |
-
padded_sequence = pad_sequences(sequence, maxlen=
|
57 |
emotion = emotion_model.predict(padded_sequence).flatten()
|
58 |
|
59 |
# Combine emotion and audio features for recommendation
|
|
|
53 |
if lyrics and all(audio_features):
|
54 |
# Process the lyrics
|
55 |
sequence = tokenizer.texts_to_sequences([lyrics])
|
56 |
+
padded_sequence = pad_sequences(sequence, maxlen=50) # Adjust the maxlen to match the expected input size
|
57 |
emotion = emotion_model.predict(padded_sequence).flatten()
|
58 |
|
59 |
# Combine emotion and audio features for recommendation
|