-
-
Save amankharwal/527d579205be791e82b45190568799b6 to your computer and use it in GitHub Desktop.
This file contains 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 | |
st.write("# Real Time Sentiment Analysis") | |
user_input = st.text_input("Please rate our services >>: ") | |
nltk.download("vader_lexicon") | |
s = SentimentIntensityAnalyzer() | |
score = s.polarity_scores(user_input) | |
if score == 0: | |
st.write(" ") | |
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