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 πŸ“§

Releases

No releases published

Packages

No packages published