git clone https://github.com/discus0434/tweetgen-from-timeline.git
cd tweetgen-from-timelinepip install -r requirements.txtconda create -n tweetgen python=3.9
echo "source activate tweetgen" > ~/.bashrc
conda run -n tweetgen pip install -r requirements.txtdocker build tweetgen-from-timeline/. -t tweetgen-from-timeline
docker run -it --runtime=nvidia -d --restart=always tweetgen-from-timeline:latest bashArrange .env file in the project directory.
.env file should look like this:
API_KEY = XXX
API_SECRET_KEY = XXX
BEARER_TOKEN = XXX
ACCESS_TOKEN = XXX
ACCESS_TOKEN_SECRET = XXXAll you need is write a command below:
python main.py & disownIn addition, you can modify the number of tweets and fine-tuning per day to change values of NUM_UPDATE_PER_DAY and
NUM_TWEETS_PER_DAY in main.py.
For example, if you want to make tweets per 30min:
NUM_TWEETS_PER_DAY = 48 # 86400 / 1800 = 48do fine-tuning per hour:
NUM_UPDATE_PER_DAY = 24This code borrows from transformers.