这是我的全部代码:
from modelscope.pipelines import pipeline
from modelscope.preprocessors import MGLMSummarizationPreprocessor
from modelscope.utils.constant import Tasks
model = 'ZhipuAI/Multilingual-GLM-Summarization-zh'
preprocessor = MGLMSummarizationPreprocessor()
pipe = pipeline(
task=Tasks.text_summarization,
model=model,
preprocessor=preprocessor,
)
result = pipe(
'测试!!!!!!!!!!。'
)
print(result)
ModelScope旨在打造下一代开源的模型即服务共享平台,为泛AI开发者提供灵活、易用、低成本的一站式模型服务产品,让模型应用更简单!欢迎加入技术交流群:微信公众号:魔搭ModelScope社区,钉钉群号:44837352