Skip to content

Commit

Permalink
Move transcriptions to individual cache files
Browse files Browse the repository at this point in the history
  • Loading branch information
chidiwilliams committed Jul 4, 2023
1 parent 472bdc0 commit 36bd268
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions buzz/model_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ class TranscriptionModel:
}


def get_hugging_face_dataset_file_url(author: str, repository_name: str, filename: str):
return f'https://huggingface.co/datasets/{author}/{repository_name}/resolve/main/{filename}'
def get_hugging_face_file_url(author: str, repository_name: str, filename: str):
return f'https://huggingface.co/{author}/{repository_name}/resolve/main/{filename}'


def get_whisper_cpp_file_path(size: WhisperModelSize) -> str:
Expand Down Expand Up @@ -132,8 +132,8 @@ def __init__(self, model: TranscriptionModel):
def run(self) -> None:
if self.model.model_type == ModelType.WHISPER_CPP:
model_name = self.model.whisper_model_size.value
url = get_hugging_face_dataset_file_url(author='ggerganov', repository_name='whisper.cpp',
filename=f'ggml-{model_name}.bin')
url = get_hugging_face_file_url(author='ggerganov', repository_name='whisper.cpp',
filename=f'ggml-{model_name}.bin')
file_path = get_whisper_cpp_file_path(
size=self.model.whisper_model_size)
expected_sha256 = WHISPER_CPP_MODELS_SHA256[model_name]
Expand Down

0 comments on commit 36bd268

Please sign in to comment.