pre-commit lint

This commit is contained in:
雨泓
2022-06-23 13:12:57 +08:00
parent 7d9b163a92
commit 56cb04cefe
26 changed files with 103 additions and 99 deletions

View File

@@ -19,8 +19,7 @@ class WordSegmentationTest(unittest.TestCase):
def test_run_by_direct_model_download(self):
cache_path = snapshot_download(self.model_id)
tokenizer = TokenClassifcationPreprocessor(cache_path)
model = SbertForTokenClassification(
cache_path, tokenizer=tokenizer)
model = SbertForTokenClassification(cache_path, tokenizer=tokenizer)
pipeline1 = WordSegmentationPipeline(model, preprocessor=tokenizer)
pipeline2 = pipeline(
Tasks.word_segmentation, model=model, preprocessor=tokenizer)