Skip to main content

API client for GPT-2 text generator cloud hosted by Open Medical IO

Project description

gpt2

API client for GPT-2 text generator hosted on the cloud by Open Medical IO

Generate synthetic text from your custom prompt with the latest released 774M model of OpenAI's GPT-2. We take care of the GPU backend. See openmedical.io/gpt2 for product demo and obtaining an API key!

Installation

pip install --upgrade gpt2

Usage

from gpt2 import Client
c = Client('API SECRET')
output_list = c.fast_generate(prompt='On a perfect summer day we went to')

"""
Generate text on the large 774M model using your own prompt and standard parameters.
This only takes a few seconds per query.
We're training additional models for your use in the near future, such as 774M finetuned on Chinese, Spanish, Wikipedia...
We're also releasing finetuning APIs in September 2019.
Stay tuned :)
"""

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gpt2-0.0.4.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

gpt2-0.0.4-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page