Downloads · 30 days
15
4% of all-time downloads
svjack/T5-dialogue-collect
T5-dialogue-collect is a text generation model from svjack. Use it when you need the model to write or continue text. It is set up for transformers.
Downloads · 30 days
15
4% of all-time downloads
All-time downloads
387
Public
Repo size
4 GB
Likes
0
Public
Click a slice to open those files.
.bin990 MB · 100%
From the Hugging Face model README
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("svjack/T5-dialogue-collect")
model = AutoModelForSeq2SeqLM.from_pretrained("svjack/T5-dialogue-collect")
text = '''
根据下面的上下文进行分段:
上下文 他 喜欢 吃 汉堡 是 但 我 可 不 喜欢。
答案:
'''
tokenizer.decode(
model.generate(
tokenizer.encode(
text, return_tensors="pt", add_special_tokens=True
))[0],
skip_special_tokens = True
)
'''
'分段:他喜欢吃汉堡 分段:是的,但我可不喜欢。'
'''