Skip to content

An application that uses GPT-2 to generate news articles from user given prompts

Notifications You must be signed in to change notification settings

yoonseokham/gpt2-article-generator

 
 

Repository files navigation

GPT2 Article Generator

Run on Ainize

GPT2 Article Generator

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.

Setup

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

Usage

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

About

An application that uses GPT-2 to generate news articles from user given prompts

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 86.0%
  • HTML 13.4%
  • Dockerfile 0.6%