Git Product home page Git Product logo

trumpbot's Introduction

TrumpBot

A chat bot to emulate Donald Trump's speech

Download the App (Android 4.3+)

The Android app is now available on the play store! You can find it here or by searching for TrumpBot.

Web Messenger

A long long time after the hackathon, we eventually built a web version. We used Vue.js to create the application. Try it out here

TrumpBot API

GET /

Response: API Working

This is just a test to determine whether the API is online.

GET /response

This will return a completely random sentence.

You can customise it by sending a parameter:

?q=<SENTENCE>

Problems We Encountered

  • Tensorflow didn't seem to work, so after many hours of attempted (and failed) bug fixes, we switched from LSTM networks to simple Markov Chains.
  • Twitter has a limit on the number of tweets you can download. An alternative method of harvesting tweets was found.

Dependencies

  • Python 3.5.2
  • Flask Python Package
  • Twython Python Package
  • h5py Python Package
  • scipy Python Package
  • Ngrok (temporary, for tunelling local server to the internet)
  • OhmGeek's fork of markov-sentence-generator (for generating the sentences)

Running the bot

On Linux, simply open terminal, navigate to the folder where run.sh is located

$ cd /path/to/server/

Make sure run.sh is executable (note: this requires root)

$ chmod +x run.sh

Finally, run the script

$ ./run.sh

Twilio

To use Twilio, you will need to create an account, and go through all the Twilio sign up procedure (including gettting a phone number).

Once you have done this, go to the phone.py script and enter the URI of the main bot server.

$ python3 phone.py

This will run the phone server. Then enter the URI of the phone server in the section called 'Web Hooks' on Twilio.

License

This project is distributed under the MIT License. Feel free to adapt these components for another project!

trumpbot's People

Contributors

mikecroall avatar ohmgeek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 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.