Next Word Prediction
Generative Pretrained Transformer 2 (GPT-2) for Language Modeling using the PyTorch-Transformers library.
Installation
Requires python>=3.5, pytorch>=1.6.0, pytorch-transformers>=1.2.0
pip install next-word-prediction
How to use
>>> from next_word_prediction import GPT2
>>> gpt2 = GPT2()
>>> text = "The course starts next"
>>> gpt2.predict_next(text, 5)
The course starts next ['week', 'to', 'month', 'year', 'Monday']
Demo via Streamlit
streamlit run app/run.py
Metadata
Release files for next-word-prediction 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| next_word_prediction-0.2.0.tar.gz | 2.1 kB | Without provenance | Details for next_word_prediction-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| next_word_prediction-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for next_word_prediction-0.2.0-py3-none-any.whl |
Total release size: 5.5 kB
Release files / next_word_prediction-0.2.0.tar.gz
| Download URL | next_word_prediction-0.2.0.tar.gz |
|---|---|
| Size | 2.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
14f2bed9244f64107b982d4ee437d65c926fe5616dbb04bec97f52b1fe57d009
|
|
BLAKE2b-256 checksum How to use checksums |
5d4e9886136a81a58faa583323aa18a50d6a375d71e3a118cc1f56e1d42bdc1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.0
|
Release files / next_word_prediction-0.2.0-py3-none-any.whl
| Download URL | next_word_prediction-0.2.0-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
82fbd5afb016d8bb5683c6fc1a2884542792a5bad8dea46cb13a684e962e3b7c
|
|
BLAKE2b-256 checksum How to use checksums |
2e4b859c502c14f4e5377183ab072a2a80deee1a91a68e27f6d843429da4b084
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.0
|
Security for next-word-prediction 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.