Skip to content

GPT-2 User Interface based on HuggingFace's Pytorch Implementation

Notifications You must be signed in to change notification settings

vineel-concat/gpt-2xy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPT2 XY

This repository uses HuggingFace's GPT2 Implementation and exposes an creates a nice user interface for testing GPT2 power. Even though it may not be exactly as good as authors' original tensorflow implementation, it still surprises sometimes.

New: Added GPT-2 Medium model support (large model requires >2GB RAM which is not supported by Cloud Run)

Get Started

To get started on this project, follow these steps:

  • Clone: git clone https://github.com/NaxAlpha/gpt-2xy.git and cd gpt-2xy
  • Install Dependencies: pip install -r requirements.txt
  • Run server: python main.py
  • Open Web Browser and visit: http://localhost:8080/
  • Type Microsoft and Google and press GENERATE TEXT
  • Enjoy!

You may also want to build and run this project in docker container

  • Build: docker build -t gpt-2xy . (will take some time)
  • Run: docker run -p 8080:8080 --rm -d gpt-2xy

If successful, you will see something like this:

Demo Image

Full Tutorial

This repository contains code for my medium tutorial on Deploy Machine Learning Model in Google Cloud using Cloud Run

About

GPT-2 User Interface based on HuggingFace's Pytorch Implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 57.3%
  • Python 39.8%
  • Dockerfile 2.9%