Metadata-Version: 2.1
Name: text2tags-lib
Version: 0.0.7
Summary: Use a finetune of Llama-7b and llama cpp to predict Danbooru tags from natural text.
License: MIT License
Project-URL: Homepage, https://github.com/DatboiiPuntai/text2tags-lib
Project-URL: Download, https://github.com/DatboiiPuntai/text2tags-lib/archive/refs/heads/master.zip
Project-URL: Repository, https://github.com/DatboiiPuntai/text2tags-lib
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Description-Content-Type: text/markdown
Requires-Dist: editdistance
Requires-Dist: llama-cpp-python==0.2.27
Requires-Dist: wget

# text2tags

Text2tags is a Python library that uses a finetune of Llama-7b and llama cpp to predict Danbooru tags from natural text.

## Installation
Use the package manager [pip]
```
pip install text2tags-lib
```

## Usage

```python
from text2tags import TaggerLlama

model = TaggerLlama()

tags = model.predict_tags("Minato Aqua from hololive with pink and blue twintails in a blue maid outfit")

print(', '.join(tags))
```

## Demos

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/DatboiiPuntai/text2tags-lib/blob/master/examples/text2tags_colab.ipynb)
[![Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/ooferdoodles/text2tags-demo)

## Other links
- [Training Code and Data Analysis](https://github.com/DatboiiPuntai/Text2Tags)
- [Blog](https://medium.com/@pantaisuyasri/extracting-danbooru-tags-from-text-9b820478a7d8)

## License

[MIT](https://choosealicense.com/licenses/mit/)
