Coder Social home page Coder Social logo

char-rnn's Introduction

#ObamaBot Tweet at ObamaBot at @PseudoObamaBot! For best responses tweet political topics.

I used a recurrent neural net with 2 hidden layers, a dropout rate of 0.5, and rnn size of 521. A 1.5MB text file of Obama speeches to generate Obama-Style speeches. Then I used a Markov Twitter bot to read from the output of the Obama-Style speeches and generate short tweets with certain keywords that Donald Trump supporters tweet out.

Used a bunch of pre-existing libraries. Notably:

  • char-rnn for the recurrent neural net
  • using pseudoObama-Style text as input to respond to keywords extracted from Donald Trump's tweets
  • indico to parse keywords and intent of tweets

Install a bunch of things, I recommed using a separate environment running python 2

  • download torch / Lua
  • run this command, this will take a pretty long time to run though.
$ th train.lua -data_dir data/Obama -rnn_size 512 -num_layers 2 -dropout 0.5
  • get some output Obama gibberish: (you can add a length and primetext and temperature, these are fun things to play with)
$ th sample.lua cv/some_checkpoint.t7 -gpuid -1 
  • you can redirect your ouput of Obama gibership into a text file and let the markov model read from it
  • set up twitter app -run
python ObamaBot/app.py

Used the following open source libraries:

License

MIT

char-rnn's People

Contributors

karpathy avatar cherylyli avatar guillitte avatar hughperkins avatar udibr avatar germuth avatar ajkl avatar audy avatar ericzeiberg avatar gdb avatar yafahedelman avatar johnny5550822 avatar josephmmisiti avatar donglixp avatar mpiffault avatar maurizi avatar siemiatj avatar skwerlman avatar

Stargazers

Dmitrii Kustikov avatar

Watchers

Raymond Chung avatar  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.