Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
|
|
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
|