Skip to main content

Text Generation Using Keywords

Project description

keytotext

pypi Version Downloads Open In Colab Streamlit App API Call Docker Call HuggingFace Documentation Status Code style: black CodeFactor

keytotext

Idea is to build a model which will take keywords as inputs and generate sentences as outputs.

Potential use case can include:

  • Marketing
  • Search Engine Optimization
  • Topic generation etc.
  • Fine tuning of topic modeling models

Model:

Keytotext is based on the Amazing T5 Model: HuggingFace

  • k2t: Model
  • k2t-base: Model
  • mrm8488/t5-base-finetuned-common_gen (by Manuel Romero): Model

Training Notebooks can be found in the Training Notebooks Folder

Note: To add your own model to keytotext Please read Models Documentation

Usage:

Example usage: Open In Colab

Example Notebooks can be found in the Notebooks Folder

pip install keytotext

carbon (3)

Trainer:

Keytotext now has a trainer class than be used to train and finetune any T5 based model on new data. Updated Trainer docs here: Docs

Trainer example here: Open In Colab

from keytotext import trainer

carbon (6)

UI:

UI: Streamlit App

pip install streamlit-tags

This uses a custom streamlit component built by me: GitHub

image

API:

API: API Call Docker Call

The API is hosted in the Docker container and it can be run quickly. Follow instructions below to get started

docker pull gagan30/keytotext

docker run -dp 8000:8000 gagan30/keytotext

This will start the api at port 8000 visit the url below to get the results as below:

http://localhost:8000/api?data=["India","Capital","New Delhi"]

k2t_json

Note: The Hosted API is only available on demand

BibTex:

To quote keytotext please use this citation

@misc{bhatia, 
      title={keytotext},
      url={https://github.com/gagan3012/keytotext}, 
      journal={GitHub}, 
      author={Bhatia, Gagan}
}

References

Articles about keytotext:

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

keytotext-2.1.1.tar.gz (744.9 kB view details)

Uploaded Source

Built Distribution

keytotext-2.1.1-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file keytotext-2.1.1.tar.gz.

File metadata

  • Download URL: keytotext-2.1.1.tar.gz
  • Upload date:
  • Size: 744.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.27.1

File hashes

Hashes for keytotext-2.1.1.tar.gz
Algorithm Hash digest
SHA256 dec230559382cc06daf8ca24f041f8e98d6c50ff606c5f56fe15a9a54e84592c
MD5 60fb6917ac38f21d85122eaa87db9d4f
BLAKE2b-256 e2dc51a90dc279bc4628e2f35593f759dbb7714f4fb5b706986085d460ba6f99

See more details on using hashes here.

File details

Details for the file keytotext-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: keytotext-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.27.1

File hashes

Hashes for keytotext-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fc89f8a62d18ac761fb1104146abd3db0a7c402823b46bad2d5399c69be09278
MD5 751bf263797b9adc223963c3719dc855
BLAKE2b-256 366b0a85cea9cfc5a445b80e98a1c10ee0e4dba4eda8891cb167ba51786558a7

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