brendabor commited on
Commit
65bb153
·
1 Parent(s): 1f9b2ed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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=128)
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