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

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-tiny: 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. Trainer docs here: Docs

Trainer example here: Open In Colab

from keytotext import trainer

image

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-1.3.8.tar.gz (722.6 kB view details)

Uploaded Source

Built Distribution

keytotext-1.3.8-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for keytotext-1.3.8.tar.gz
Algorithm Hash digest
SHA256 09c5772b5cbdd5c3428fa9279986619c7db9e2254bff8429113d02737bc6e5a4
MD5 8a85dbb8055ad03d534964f30f3c950a
BLAKE2b-256 a1b9e13ceb177b21d3f9eb16719e8ae061048cf77ef466d2c7881a290cc2ad93

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for keytotext-1.3.8-py3-none-any.whl
Algorithm Hash digest
SHA256 11f117ce5f5d6322a3cfd1acea5ae7c2dffbe5db3380c522ca2494ceeaf606eb
MD5 e55f5589eb31c5a7e05fb7b30e264b15
BLAKE2b-256 a1f841285f168fb5bde3d8281fadb5ba98c35c6ec5545658292b7e3f160fdf88

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