itzbhav commited on
Commit
a56f6f0
·
verified ·
1 Parent(s): 49b411b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -49,7 +49,8 @@ elif page == "🧩 ML-Based Analysis":
49
  emotion_pipe = pipeline("text-classification", model="bhadresh-savani/distilbert-base-uncased-emotion", top_k=2)
50
  emotions = emotion_pipe(user_input)
51
  st.write("**🎭 Emotion Predictions:**")
52
- for emo in emotions:
 
53
  st.write(f"- {emo['label']} (Score: {emo['score']:.2f})")
54
 
55
  # Tips based on polarity
 
49
  emotion_pipe = pipeline("text-classification", model="bhadresh-savani/distilbert-base-uncased-emotion", top_k=2)
50
  emotions = emotion_pipe(user_input)
51
  st.write("**🎭 Emotion Predictions:**")
52
+ for inner_list in emotions:
53
+ for emo in inner_list:
54
  st.write(f"- {emo['label']} (Score: {emo['score']:.2f})")
55
 
56
  # Tips based on polarity