Skip to content

Commit

Permalink
New PR: Allow users to add their own customised model without editing…
Browse files Browse the repository at this point in the history
… existing faster-whisper code

Added a function to allow users to add their own Hugging Face ct2 models.
Provides a user-friendly way to test other models.
  • Loading branch information
blackpolarz committed Oct 11, 2024
1 parent d57c5b4 commit 594e2a5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions faster_whisper/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
}


def add_model(model_dict) -> dict:
"""Adds a dictionary of custom Models to existing Model"""
_MODELS.update(model_dict)
return _MODELS


def available_models() -> List[str]:
"""Returns the names of available models."""
return list(_MODELS.keys())
Expand Down

0 comments on commit 594e2a5

Please sign in to comment.