初始化项目,由ModelHub XC社区提供模型

Model: kotoba-tech/kotoba-whisper-v1.1
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-05-15 00:55:37 +08:00
commit da0101b756
19 changed files with 182908 additions and 0 deletions

29
pipeline/push_pipeline.py Normal file
View File

@@ -0,0 +1,29 @@
from kotoba_whisper import KotobaWhisperPipeline
from transformers.pipelines import PIPELINE_REGISTRY, pipeline
from transformers import WhisperForConditionalGeneration, TFWhisperForConditionalGeneration
model_alias = "kotoba-tech/kotoba-whisper-v1.1"
PIPELINE_REGISTRY.register_pipeline(
"kotoba-whisper",
pipeline_class=KotobaWhisperPipeline,
pt_model=WhisperForConditionalGeneration,
tf_model=TFWhisperForConditionalGeneration
)
pipe = pipeline(
task="kotoba-whisper",
model="kotoba-tech/kotoba-whisper-v1.0",
chunk_length_s=15,
batch_size=16,
punctuator=True,
stable_ts=True,
)
pipe.push_to_hub(model_alias)
pipe = pipeline(model=model_alias,
punctuator=True,
stable_ts=True,
chunk_length_s=15,
batch_size=16,
trust_remote_code=True)