from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("svjack/squad_gen_qst_zh_v0")
model = AutoModelForSeq2SeqLM.from_pretrained("svjack/squad_gen_qst_zh_v0")
tokenizer.decode(
model.generate(
tokenizer.encode(
"川普是美利坚共和国的总统,并在56岁时获得该奖项。|美利坚",
return_tensors="pt", add_special_tokens=True
))[0],
skip_special_tokens = True
)
'''
'川普在哪个国家当总统?'
'''
- Downloads last month
- 12
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.