tweetGen generates tweets from any given corpus. The sentences are calculated via a stochastic model describing a sequence of possible events in which the probability of each event depends only on the state attained in the previous event (Markov Chain).
💻 Prerequisites
What things you need to install the software and how to install them
- python 3.4+
🚀 Getting Started
The python modules were configured in a virtual enviornment with pipenv
:
macOS Mojave 10.0+
# (if you have pipenv installed skip this step)
brew install pipenv
# clone repository
git clone https://github.com/imthaghost/tweetGen
# active the virtual enviornment
pipenv shell
# install modules into virtual environment
pipenv install
# start server
python3 app.py
This also assumes that you have
brew
installed. After cloning the repository in desired directory we run the commandpipenv shell
to initialize and activate our virtual enviornment. Unless specified pipenv will default to whatever virtualenv defaults to. We then allow pipenv to find and install the necessary modules for our server. All modules can be viewed inside the filePipfile
under the [packages] section. We then start running the server on port 8080.
apt systems Ubuntu, Debian, Mint, Etc
# install pipenv
sudo pip install pipenv
# clone repository
git clone https://github.com/imthaghost/tweetGen
# active the virtual enviornment
pipenv shell
# install modules into virtual environment
pipenv install
# start flask server
python3 app.py
Virtual Env
# create and enter python virtualenv
. virtualenv.sh
# install modules into virtual environment
pip install requirements.txt
# patch flash_upload
patch -Np0 < flask_uploads.py.diff
# start flask server
python3 app.py
Built With
- Flask Micro-Framework - The web framework used
- Wordcloud - Dependency
Acknowledgments
- Hat tip to my professor Alan Davis
- Great way of understanding Vose Alias Method Keith Schwarz