marwanmusa / AI-Text-Generation

Build Text Generator app with GPT-Neo by EleutherAI and GPT2 by OpenAI using Transformer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Text Generation using GPT-Neo and GPT2

Build Text Generator app with GPT-Neo by EleutherAI and GPT2 by OpenAI using Transformer.

Source :

  1. GPT-Neo : Github, HuggingFace
  2. GPT2 : Github, HuggingFace
  3. Transformers - Text Generation Strategies : HuggingFace

How to run:

  1. Clone this repository
git clone https://github.com/marwanmusa/AI-Text-Generation.git
  1. Make virtual environment on your local directory
python -m venv "your_env_name"
  1. Activate the environment
"your_env_name"/Scripts/Activate.ps1
  1. Install dependencies in requirements.txt
pip install -r path/to/requirements.txt

or if you are using pipenv, then

pipenv install -r path/to/requirements.txt
  1. Run .py files
python GPTNeo.py # for GPTNeo
python GPT2.py # for GPT2

Note
You need to adjust your torch installation version to match with your cuda toolkit version installed.

About

Build Text Generator app with GPT-Neo by EleutherAI and GPT2 by OpenAI using Transformer


Languages

Language:Jupyter Notebook 91.4%Language:Python 8.6%