An application to allow for generating news articles using OpenAI's GPT-2 text generator. The model used for this was further trained on All The News, a dataset of over 200,000 news articles by components.one.
The repository can be cloned as normal:
git clone https://github.com/DanTm99/gpt2-article-generator.git
The model this program uses is hosted on Google Drive and can be downloaded from here. The contents of this archive should be extracted to the gpt2-article-generator
folder so that the checkpoint
is in the gpt2-article-generator
folder.
Navigate into the folder:
cd gpt2-article-generator
To use this with your GPU you must have and NVIDIA GPU with a CUDA Compute Capability 3.5 or higher.
If you have the required hardware you must install the required software on your system as shown here.
Install the required packages as normal to use this with GPU support:
pip3 install -r requirements.txt
To use this without GPU support use the following command instead:
pip3 install -r requirements-no-gpu.txt
To open the GUI use the following command:
python3 ArticleGenerator.py
This application can also be used via the command line. For detailed help use the following command:
python3 ArticleGenerator.py -h