Browse Source

fix bug

master
suluyan 3 years ago
parent
commit
9e846b8fc0
2 changed files with 3 additions and 1 deletions
  1. +1
    -0
      modelscope/metainfo.py
  2. +2
    -1
      modelscope/pipelines/nlp/fill_mask_pipeline.py

+ 1
- 0
modelscope/metainfo.py 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'


+ 2
- 1
modelscope/pipelines/nlp/fill_mask_pipeline.py 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,


Loading…
Cancel
Save