git clone https://github.com/discus0434/tweetgen-from-timeline.git
cd tweetgen-from-timeline
pip install -r requirements.txt
conda create -n tweetgen python=3.9
echo "source activate tweetgen" > ~/.bashrc
conda run -n tweetgen pip install -r requirements.txt
docker build tweetgen-from-timeline/. -t tweetgen-from-timeline
docker run -it --runtime=nvidia -d --restart=always tweetgen-from-timeline:latest bash
Arrange .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 = XXX
All you need is write a command below:
python main.py & disown
In 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 = 48
do fine-tuning per hour:
NUM_UPDATE_PER_DAY = 24
This code borrows from transformers.