Skip to content

Instantly share code, notes, and snippets.

Created Mar 19, 2021
What would you like to do?
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 >>: ")"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