Giter Site home page Giter Site logo

tweet_bot's Introduction

Tweet Bot

Setup this

  • 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
  1. Create an account
  2. Connect mobile phone with your account
  3. Create an app
  4. Open up the app settings; go to "Keys and Access Tokens"
  5. Grab consumer key/API key, consumer secret/API secret ; save locally
  6. Create access token; save access token, access token secret locally
  7. 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

Execute

  • 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

tweet_bot's People

Contributors

suriyadeepan avatar selvadevan avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.