Last active
July 18, 2021 08:22
-
-
Save Abhayparashar31/1d1cb11a2bc5e5d8cc762e85dbccf1f4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import streamlit as st | |
| import nltk | |
| from nltk.sentiment.vader import SentimentIntensityAnalyzer | |
| nltk.download('vader_lexicon') | |
| st.write(" Real Time Sentiment Analyzer ") | |
| input = st.text_input("Enter Your Review...") | |
| score = SentimentIntensityAnalyzer().polarity_scores(input) | |
| if score==0: st.write("Neutral") | |
| elif score['neg']!=0: st.write("Negative") | |
| elif score['pos']!=0: st.write("Positive") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment