This commit is contained in:
suluyan
2022-06-22 17:31:52 +08:00
parent e43e5930f4
commit 9e846b8fc0
2 changed files with 3 additions and 1 deletions

View File

@@ -45,6 +45,7 @@ class Pipelines(object):
word_segmentation = 'word-segmentation'
text_generation = 'text-generation'
sentiment_analysis = 'sentiment-analysis'
fill_mask = 'fill-mask'
# audio tasks
sambert_hifigan_16k_tts = 'sambert-hifigan-16k-tts'

View File

@@ -1,5 +1,6 @@
from typing import Dict, Optional, Union
from modelscope.metainfo import Pipelines
from modelscope.models import Model
from modelscope.models.nlp.masked_language_model import \
AliceMindBaseForMaskedLM
@@ -11,7 +12,7 @@ from ..builder import PIPELINES
__all__ = ['FillMaskPipeline']
@PIPELINES.register_module(Tasks.fill_mask, module_name=r'fill_mask')
@PIPELINES.register_module(Tasks.fill_mask, module_name=Pipelines.fill_mask)
class FillMaskPipeline(Pipeline):
def __init__(self,