Skip to content

yogeshnile/Twitter-Sentiment-Analysis-on-Flask-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twitter Sentiment Analysis on FlaskApp 📓

In this repo i created a twitter sentiment analysis on flask app (web base).

You can also check a demo website 👉 click here

Directory Tree 🌵

.
├── 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

Technology used in Project ♨️

Application 📢

Ckeck out Twitter Sentiment Analysis on python GUI App 👉 click here

Ckeck out Twitter Sentiment Analysis on python Jupyter Notebook 👉 click here

Disclaimer ☠️

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)

ScreenShot 📸

Bug / Feature Request 👨‍💻

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.

Connect with me! 🌐

Known on internet as Yogesh Nile

Email Me 📧