Pavani2704 commited on
Commit
518f1a5
β€’
1 Parent(s): 5f4e1e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -1
app.py CHANGED
@@ -53,7 +53,21 @@ elif option == "Emotion Detection":
53
  text=st.text_area("Enter your text")
54
  if st.button("Submit"):
55
  if text:
56
- st.write("Emotion : ",emopipe(text)[0]["label"])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  else:
58
  st.write("Please enter text.")
59
 
 
53
  text=st.text_area("Enter your 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.")
73