- pull pretrained model
# pull metadata
wget -c 'https://www.dropbox.com/s/d35skwq8hk2ljbr/metadata.pkl?dl=0' -O metadata.pkl
# pull pretrained model
cd ckpt
./pull
cd ..
- setup twitter bot
- Create an account
- Connect mobile phone with your account
- Create an app
- Open up the app settings; go to "Keys and Access Tokens"
- Grab consumer key/API key, consumer secret/API secret ; save locally
- Create access token; save access token, access token secret locally
- Note down Owner ID and your handle
# need 'tweepy' module
sudo -H pip3 install --upgrade tweepy
# clone repository
git clone https://github.com/suriyadeepan/tweet_bot
cd tweet_bot
# download template config file
wget -c 'https://raw.githubusercontent.com/twitterdev/sample-python-autoreply/master/.twitter.sample' -O .twitter.sample
# **fill in .twitter.sample with keys and tokens**
#
# setup complete
- chatbot
import chatbot
# >> Initializing data
# >> Initializing model
# <log> Building Graph </log>
# >> Loading pretrained model
# >> Initialization complete; call respond(msg)
chatbot.respond('Hey! Good morning.. Have a nice day.')
# 'have a wonderful weekend'
- autoreply
# checklist
# - [ ] download pretrained model and metadata
# - [ ] fill in access keys and tokens in .twitter.sample
python3 autoreply.py