diff options
Diffstat (limited to 'python-keytotext.spec')
| -rw-r--r-- | python-keytotext.spec | 440 |
1 files changed, 440 insertions, 0 deletions
diff --git a/python-keytotext.spec b/python-keytotext.spec new file mode 100644 index 0000000..59c341e --- /dev/null +++ b/python-keytotext.spec @@ -0,0 +1,440 @@ +%global _empty_manifest_terminate_build 0 +Name: python-keytotext +Version: 2.3.2 +Release: 1 +Summary: Text Generation Using Keywords +License: MIT +URL: https://github.com/gagan3012/keytotext +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/61/3e/9953ce241b8016150c3bd32ad9f037fcbbfb273f2b7fbd6d4461e7fb9024/keytotext-2.3.2.tar.gz +BuildArch: noarch + +Requires: python3-torch +Requires: python3-transformers +Requires: python3-sentencepiece +Requires: python3-wandb +Requires: python3-pytorch_lightning +Requires: python3-datasets +Requires: python3-huggingface_hub +Requires: python3-keybert + +%description +<h1 align="center">keytotext</h1> + +[](https://pypi.org/project/keytotext/) +[](https://pepy.tech/project/keytotext) +[](https://colab.research.google.com/github/gagan3012/keytotext/blob/master/notebooks/K2T.ipynb) +[](https://share.streamlit.io/gagan3012/keytotext/UI/app.py) +[](https://github.com/gagan3012/keytotext#api) +[](https://hub.docker.com/r/gagan30/keytotext) +[](https://huggingface.co/models?filter=keytotext) +[](https://keytotext.readthedocs.io/en/latest/?badge=latest) +[](https://github.com/psf/black) +[](https://www.codefactor.io/repository/github/gagan3012/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: [](https://huggingface.co/models?filter=keytotext) + +- `k2t`: [Model](https://huggingface.co/gagan3012/k2t) +- `k2t-base`: [Model](https://huggingface.co/gagan3012/k2t-base) +- `mrm8488/t5-base-finetuned-common_gen` (by Manuel Romero): [Model](https://huggingface.co/mrm8488/t5-base-finetuned-common_gen) + +Training Notebooks can be found in the [`Training Notebooks`](https://github.com/gagan3012/keytotext/tree/master/notebooks) Folder + +**Note**: To add your own model to keytotext Please read [`Models Documentation`](https://github.com/gagan3012/keytotext/blob/master/docs/MODELS.md) + +## Usage: + +Example usage: [](https://colab.research.google.com/github/gagan3012/keytotext/blob/master/notebooks/K2T.ipynb) + +Example Notebooks can be found in the [`Notebooks`](https://github.com/gagan3012/keytotext/tree/master/examples) Folder + +```shell script +pip install keytotext +``` + + + +## 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`](https://github.com/gagan3012/keytotext/blob/master/docs/TRAINER.md) + +Trainer example here: [](https://colab.research.google.com/github/gagan3012/keytotext/blob/master/notebooks/Trainer.ipynb) + +```python +from keytotext import trainer +``` + + + +## UI: + +UI: [](https://share.streamlit.io/gagan3012/keytotext/UI/app.py) + +```shell script +pip install streamlit-tags +``` +This uses a custom streamlit component built by me: [GitHub](https://github.com/gagan3012/streamlit-tags) + + + +## API: + +API: [](http://localhost:8000/api?data=[%22India%22,%22Capital%22,%22New%20Delhi%22]) +[](https://hub.docker.com/r/gagan30/keytotext) + +The API is hosted in the Docker container and it can be run quickly. +Follow instructions below to get started + +```shell script +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"] +``` + + + +Note: The Hosted API is only available on demand +## BibTex: + +To quote keytotext please use this citation + +```bibtex +@misc{bhatia, + title={keytotext}, + url={https://github.com/gagan3012/keytotext}, + journal={GitHub}, + author={Bhatia, Gagan} +} +``` + +# References +- https://github.com/Shivanandroy/simpleT5 (Shivanand Roy) +- https://github.com/patil-suraj/question_generation (Suraj Patil) +- https://github.com/MathewAlexander/T5_nlg (Mathew Alexander) + + +## Articles about keytotext: + +- https://towardsdatascience.com/data-to-text-generation-with-t5-building-a-simple-yet-advanced-nlg-model-b5cce5a6df45 (Mathew Alexander) +- Amazing Video by [1LittleCoder](https://twitter.com/1littlecoder) here: https://www.youtube.com/watch?v=I0iBzP-SxFY about keytotext +- https://medium.com/mlearning-ai/generating-sentences-from-keywords-using-transformers-in-nlp-e89f4de5cf6b (Prakhar Mishra) + + +%package -n python3-keytotext +Summary: Text Generation Using Keywords +Provides: python-keytotext +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-keytotext +<h1 align="center">keytotext</h1> + +[](https://pypi.org/project/keytotext/) +[](https://pepy.tech/project/keytotext) +[](https://colab.research.google.com/github/gagan3012/keytotext/blob/master/notebooks/K2T.ipynb) +[](https://share.streamlit.io/gagan3012/keytotext/UI/app.py) +[](https://github.com/gagan3012/keytotext#api) +[](https://hub.docker.com/r/gagan30/keytotext) +[](https://huggingface.co/models?filter=keytotext) +[](https://keytotext.readthedocs.io/en/latest/?badge=latest) +[](https://github.com/psf/black) +[](https://www.codefactor.io/repository/github/gagan3012/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: [](https://huggingface.co/models?filter=keytotext) + +- `k2t`: [Model](https://huggingface.co/gagan3012/k2t) +- `k2t-base`: [Model](https://huggingface.co/gagan3012/k2t-base) +- `mrm8488/t5-base-finetuned-common_gen` (by Manuel Romero): [Model](https://huggingface.co/mrm8488/t5-base-finetuned-common_gen) + +Training Notebooks can be found in the [`Training Notebooks`](https://github.com/gagan3012/keytotext/tree/master/notebooks) Folder + +**Note**: To add your own model to keytotext Please read [`Models Documentation`](https://github.com/gagan3012/keytotext/blob/master/docs/MODELS.md) + +## Usage: + +Example usage: [](https://colab.research.google.com/github/gagan3012/keytotext/blob/master/notebooks/K2T.ipynb) + +Example Notebooks can be found in the [`Notebooks`](https://github.com/gagan3012/keytotext/tree/master/examples) Folder + +```shell script +pip install keytotext +``` + + + +## 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`](https://github.com/gagan3012/keytotext/blob/master/docs/TRAINER.md) + +Trainer example here: [](https://colab.research.google.com/github/gagan3012/keytotext/blob/master/notebooks/Trainer.ipynb) + +```python +from keytotext import trainer +``` + + + +## UI: + +UI: [](https://share.streamlit.io/gagan3012/keytotext/UI/app.py) + +```shell script +pip install streamlit-tags +``` +This uses a custom streamlit component built by me: [GitHub](https://github.com/gagan3012/streamlit-tags) + + + +## API: + +API: [](http://localhost:8000/api?data=[%22India%22,%22Capital%22,%22New%20Delhi%22]) +[](https://hub.docker.com/r/gagan30/keytotext) + +The API is hosted in the Docker container and it can be run quickly. +Follow instructions below to get started + +```shell script +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"] +``` + + + +Note: The Hosted API is only available on demand +## BibTex: + +To quote keytotext please use this citation + +```bibtex +@misc{bhatia, + title={keytotext}, + url={https://github.com/gagan3012/keytotext}, + journal={GitHub}, + author={Bhatia, Gagan} +} +``` + +# References +- https://github.com/Shivanandroy/simpleT5 (Shivanand Roy) +- https://github.com/patil-suraj/question_generation (Suraj Patil) +- https://github.com/MathewAlexander/T5_nlg (Mathew Alexander) + + +## Articles about keytotext: + +- https://towardsdatascience.com/data-to-text-generation-with-t5-building-a-simple-yet-advanced-nlg-model-b5cce5a6df45 (Mathew Alexander) +- Amazing Video by [1LittleCoder](https://twitter.com/1littlecoder) here: https://www.youtube.com/watch?v=I0iBzP-SxFY about keytotext +- https://medium.com/mlearning-ai/generating-sentences-from-keywords-using-transformers-in-nlp-e89f4de5cf6b (Prakhar Mishra) + + +%package help +Summary: Development documents and examples for keytotext +Provides: python3-keytotext-doc +%description help +<h1 align="center">keytotext</h1> + +[](https://pypi.org/project/keytotext/) +[](https://pepy.tech/project/keytotext) +[](https://colab.research.google.com/github/gagan3012/keytotext/blob/master/notebooks/K2T.ipynb) +[](https://share.streamlit.io/gagan3012/keytotext/UI/app.py) +[](https://github.com/gagan3012/keytotext#api) +[](https://hub.docker.com/r/gagan30/keytotext) +[](https://huggingface.co/models?filter=keytotext) +[](https://keytotext.readthedocs.io/en/latest/?badge=latest) +[](https://github.com/psf/black) +[](https://www.codefactor.io/repository/github/gagan3012/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: [](https://huggingface.co/models?filter=keytotext) + +- `k2t`: [Model](https://huggingface.co/gagan3012/k2t) +- `k2t-base`: [Model](https://huggingface.co/gagan3012/k2t-base) +- `mrm8488/t5-base-finetuned-common_gen` (by Manuel Romero): [Model](https://huggingface.co/mrm8488/t5-base-finetuned-common_gen) + +Training Notebooks can be found in the [`Training Notebooks`](https://github.com/gagan3012/keytotext/tree/master/notebooks) Folder + +**Note**: To add your own model to keytotext Please read [`Models Documentation`](https://github.com/gagan3012/keytotext/blob/master/docs/MODELS.md) + +## Usage: + +Example usage: [](https://colab.research.google.com/github/gagan3012/keytotext/blob/master/notebooks/K2T.ipynb) + +Example Notebooks can be found in the [`Notebooks`](https://github.com/gagan3012/keytotext/tree/master/examples) Folder + +```shell script +pip install keytotext +``` + + + +## 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`](https://github.com/gagan3012/keytotext/blob/master/docs/TRAINER.md) + +Trainer example here: [](https://colab.research.google.com/github/gagan3012/keytotext/blob/master/notebooks/Trainer.ipynb) + +```python +from keytotext import trainer +``` + + + +## UI: + +UI: [](https://share.streamlit.io/gagan3012/keytotext/UI/app.py) + +```shell script +pip install streamlit-tags +``` +This uses a custom streamlit component built by me: [GitHub](https://github.com/gagan3012/streamlit-tags) + + + +## API: + +API: [](http://localhost:8000/api?data=[%22India%22,%22Capital%22,%22New%20Delhi%22]) +[](https://hub.docker.com/r/gagan30/keytotext) + +The API is hosted in the Docker container and it can be run quickly. +Follow instructions below to get started + +```shell script +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"] +``` + + + +Note: The Hosted API is only available on demand +## BibTex: + +To quote keytotext please use this citation + +```bibtex +@misc{bhatia, + title={keytotext}, + url={https://github.com/gagan3012/keytotext}, + journal={GitHub}, + author={Bhatia, Gagan} +} +``` + +# References +- https://github.com/Shivanandroy/simpleT5 (Shivanand Roy) +- https://github.com/patil-suraj/question_generation (Suraj Patil) +- https://github.com/MathewAlexander/T5_nlg (Mathew Alexander) + + +## Articles about keytotext: + +- https://towardsdatascience.com/data-to-text-generation-with-t5-building-a-simple-yet-advanced-nlg-model-b5cce5a6df45 (Mathew Alexander) +- Amazing Video by [1LittleCoder](https://twitter.com/1littlecoder) here: https://www.youtube.com/watch?v=I0iBzP-SxFY about keytotext +- https://medium.com/mlearning-ai/generating-sentences-from-keywords-using-transformers-in-nlp-e89f4de5cf6b (Prakhar Mishra) + + +%prep +%autosetup -n keytotext-2.3.2 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-keytotext -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 2.3.2-1 +- Package Spec generated |
