Spaces:
Sleeping
Sleeping
Pavani2704
commited on
Commit
β’
759ea45
1
Parent(s):
518f1a5
Update app.py
Browse files
app.py
CHANGED
@@ -54,19 +54,19 @@ elif option == "Emotion Detection":
|
|
54 |
if st.button("Submit"):
|
55 |
if text:
|
56 |
emotion=emopipe(text)[0]["label"]
|
57 |
-
if emotion
|
58 |
st.write("Emotion : ",emotion,"π’")
|
59 |
-
elif emotion
|
60 |
st.write("Emotion : ",emotion,"π")
|
61 |
-
elif emotion
|
62 |
st.write("Emotion : ",emotion,"π¨")
|
63 |
-
elif emotion
|
64 |
st.write("Emotion : ",emotion,"π‘")
|
65 |
-
elif emotion
|
66 |
st.write("Emotion : ",emotion,"π")
|
67 |
-
elif emotion
|
68 |
st.write("Emotion : ",emotion,"π€’")
|
69 |
-
elif emotion
|
70 |
st.write("Emotion : ",emotion,"π²")
|
71 |
else:
|
72 |
st.write("Please enter text.")
|
|
|
54 |
if st.button("Submit"):
|
55 |
if text:
|
56 |
emotion=emopipe(text)[0]["label"]
|
57 |
+
if emotion == "sadness":
|
58 |
st.write("Emotion : ",emotion,"π’")
|
59 |
+
elif emotion == "joy":
|
60 |
st.write("Emotion : ",emotion,"π")
|
61 |
+
elif emotion == "fear":
|
62 |
st.write("Emotion : ",emotion,"π¨")
|
63 |
+
elif emotion == "anger":
|
64 |
st.write("Emotion : ",emotion,"π‘")
|
65 |
+
elif emotion == "neutral":
|
66 |
st.write("Emotion : ",emotion,"π")
|
67 |
+
elif emotion == "disgust":
|
68 |
st.write("Emotion : ",emotion,"π€’")
|
69 |
+
elif emotion == "surprise":
|
70 |
st.write("Emotion : ",emotion,"π²")
|
71 |
else:
|
72 |
st.write("Please enter text.")
|