Downloads · 30 days
18
2% of all-time downloads
souljoy/t5-chinese-lyric
t5-chinese-lyric is a text generation model from souljoy. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Controllable lyrics creation generation model. Chinese lyrics can be generated based on the provided singer name, song name and several song theme keywords.
Downloads · 30 days
18
2% of all-time downloads
All-time downloads
792
Public
Parameters
783M
9.4 GB on disk
Likes
1
Public
Click a slice to open those files.
.bin3.1 GB · 50%
From the Hugging Face model README
Controllable lyrics creation generation model. Chinese lyrics can be generated based on the provided singer name, song name and several song theme keywords.
The lyric creation robot is called “小L”. So at the end of the input question, you need to add "\n小L:"
You can use this model directly with a pipeline for text2text generation:
>>> from transformers import T5Tokenizer, T5ForConditionalGeneration, Text2TextGenerationPipeline
>>> tokenizer = T5Tokenizer.from_pretrained("souljoy/t5-chinese-lyric")
>>> model = T5ForConditionalGeneration.from_pretrained("souljoy/t5-chinese-lyric")
>>> text2text_generator = Text2TextGenerationPipeline(model, tokenizer)
>>> text2text_generator("用户:写一首歌,歌手“毛毛”,歌曲“多少年后”,以“谎言,伤痛,心爱,掩饰,退一步,寻找”为主题。\\n小L:", max_length=512, do_sample=True)