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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file gpt2-0.0.4.tar.gz.

File metadata

  • Download URL: gpt2-0.0.4.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for gpt2-0.0.4.tar.gz
Algorithm Hash digest
SHA256 faa5c77c2e9dab8dc6acb69618f5032b5c84ffe6f44f64fd3ee6256a48ee0fe3
MD5 46eed40ddb6ce23d66b5718899b68380
BLAKE2b-256 f6670c8e52c7afea23dafe3d7c7936ab2450a2c1b66d60a230e558ce76e30167

See more details on using hashes here.

File details

Details for the file gpt2-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: gpt2-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for gpt2-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5b3b4c2911d4cb68195646c5d841357a7c4153fa6c98422204218218088de89f
MD5 8b0095489aa7d6b4cbc51ce7bc5939f6
BLAKE2b-256 e9d17d251f8150d0f6b28e90ccdf36637c4c7af7263d9469ae3a959f36c9cf81

See more details on using hashes here.

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