英文

T5用于生成问题

这是一个专门用于端到端生成问题任务的 t5-base 模型。只需输入文本,模型就会生成多个问题。

您可以使用推理API与模型进行互动,只需输入文本即可查看结果!

有关更多详细信息,请参阅 this repo。

模型操作 ?

您需要克隆 repo

from pipelines import pipeline

text = "Python is an interpreted, high-level, general-purpose programming language. Created by Guido van Rossum \
and first released in 1991, Python's design philosophy emphasizes code \
readability with its notable use of significant whitespace."

nlp = pipeline("e2e-qg", model="valhalla/t5-base-e2e-qg")
nlp(text)
=> [
 'Who created Python?',
 'When was Python first released?',
 "What is Python's design philosophy?"
]