In this repo i created a twitter sentiment analysis on flask app (web base).
You can also check a demo website 👉 click here
.
├── images
│ ├── 1.png
│ ├── 2.png
│ ├── 3.png
│ ├── 4.png
│ └── 5.png
├── LICENSE
├── main.py
├── README.md
├── static
│ ├── logo.png
│ └── style.css
└── templates
├── index.html
└── sentiment.html
3 directories, 12 files
Ckeck out Twitter Sentiment Analysis on python GUI App 👉 click here
Ckeck out Twitter Sentiment Analysis on python Jupyter Notebook 👉 click here
I am not provideing twitter API keys. You have get twitter API keys on twitter developer account. Get API Keys
Get a API key and put in the below code section
def sentiment():
userid = request.form.get('userid')
hashtag = request.form.get('hashtag')
if userid == "" and hashtag == "":
error = "Please Enter any one value"
return render_template('index.html', error=error)
if not userid == "" and not hashtag == "":
error = "Both entry not allowed"
return render_template('index.html', error=error)
#=====================Insert Twitter API Here==========================
consumerKey = ""
consumerSecret = ""
accessToken = ""
accessTokenSecret = ""
#=====================Insert Twitter API End===========================
authenticate = tweepy.OAuthHandler(consumerKey, consumerSecret)
authenticate.set_access_token(accessToken, accessTokenSecret)
api = tweepy.API(authenticate, wait_on_rate_limit = True)
If you find a bug (the website couldn't handle the query and / or gave undesired results), kindly open an issue here by including your search query and the expected result.
If you'd like to request a new function, feel free to do so by opening an issue here. Please include sample queries and their corresponding results.
Known on internet as Yogesh Nile