Given a link to a specific tweet, Tweet.Tone will fetch the tweet and analyze the emotional tones in its contentusing IBM Watson’s Tone Analyzer. It will then display the most dominant tones as colored dots next to the Tweet as well as generating tones for any comments made directly in response to it. The tones for the comments will be generated in a rectangular array of dots colored by tones under the searched tweet.
Additionally the user may click on any of the comment dots which will show its content along with its most dominant tone breakdown.
Page for Parent tweet / Splash Page
Dependency | Version |
---|---|
Python | 3.6 |
Bash | 4 |
- Clone this repository
- Install the Python requirements (preferably in a virtual environment of your choice)
pip install -r requirements.txt
- To use Tweet.Tone it is necessary to sign up for an IBM Cloud Account and then create an instance of the IBM Watson Tone Analyzer.
- Create a file name
.env
in the root directory of the repository - Replace the angle brackets and their contents with your corresponding credentials in
.env
.export TONE_KEY="<api-token-from-IBM-cloud-account-tone-analyzer>" export TONE_URL="<api-url-from-IBM-cloud-account-tone-analyzer>" export SECRET_KEY="<your-choice-of-secret-key-for-flask-app>"
- Make the
.env
executable.chmod u+x .env
cd
to the root directory of the repo.- Source
.env
to apply the environment variables.. .env
- Create the app (make sure your virtual enviornment is activated if you are using one)
flask run
- As deployment has not been completed, visit app locally on your machine at http://localhost:5000.