Skip to content

gpt2 finetuned by reddit data from huggingface.

Notifications You must be signed in to change notification settings

woomurf/gpt2-reddit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPT2 Reddit

API server provides gpt2 api that fine tuned by reddit dataset. gpt2 model are from huggingface.

Install

$ pip install -r requirements.txt

Usage

$ python3 server.py

and API server hosted on localhost:8000

Docker

$ docker build -t ${IMAGE_NAME} .

$ docker run -p ${YOUR_PORT}:8000 -it ${IMAGE_NAME}

cURL

$ curl -X POST "https://master-gpt2-reddit-woomurf.endpoint.ainize.ai/gpt2-reddit/short" \
  -H "accept: application/json" -H "Content-Type: multipart/form-data" \
  -F "text=test input" -F "num_samples=5"

or

$ curl -X POST "https://master-gpt2-reddit-woomurf.endpoint.ainize.ai/gpt2-reddit/long" \
  -H "accept: multipart/form-data" -H "Content-Type: multipart/form-data"\
  -F "text=test input" -F "num_samples=5" -F "length=5"

About

gpt2 finetuned by reddit data from huggingface.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published