Skip to content

P-Kshitij/TwitBertVis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twitter BERT Visualizer

Python Pytorch cuda transformers

Steps:


Run setup.sh to download and install the required packages

bash setup.sh

Add your twitter API keys in a file called twitterAPIkeys.json in the src folder, in the following format:

{
	"API key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
	"API secret key" : "xxxxxxxxxxxxxxxxxxxx",
	"Access token": "xxxxxxxxxxxxxxxxxxxxxxx",
	"Access token secret": "xxxxxxxxxxxxxxxx"
}

Generating a plot:


cd src
python main.py "seach_term" [-n number_of_tweets]

Make sure you are in the src folder. Run main.py, for example python main.py "#Covid" -n 500. An output file plot.html will be generated in the output folder. Hovering on the points shows you the tweet. The size of the points will be proportional to the number of the likes on the tweet.

Sample plot:


As the plot is interactive and requires javascript, it cannot embedded in this README. To see a generated plot use the following link, hovering on the points shows you the tweet: Sample Plot.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published