versae commited on
Commit
29c5a08
1 Parent(s): f0463f7

Add pip for whisper cli

Browse files
Files changed (1) hide show
  1. cli.py +7 -9
cli.py CHANGED
@@ -1,9 +1,7 @@
1
- import whisper
2
- whisper._MODELS["NbAiLab/whisper-large-sme"] = "https://huggingface.co/NbAiLab/whisper-large-sme/resolve/main/whisper-large-sme.pt"
3
- whisper.tokenizer.LANGUAGES["fi"] = "sami"
4
- whisper.tokenizer.TO_LANGUAGE_CODE["sme"] = "fi"
5
- whisper.tokenizer.TO_LANGUAGE_CODE["sami"] = "fi"
6
- from whisper.transcribe import cli
7
-
8
- if __name__ == "__main__":
9
- cli()
1
+ try:
2
+ import whisper
3
+ except ImportError:
4
+ print("Whisper not found. Try installing with \"pip install git+https://github.com/openai/whisper.git\"")
5
+ exit(1)
6
+ whisper._MODELS["NbAiLab/whisper-large-sme"] = "https://huggingface.co/NbAiLab/whisper-large-sme/resolve/main/bed43f50f06fd0db81c1009d7d9cbc2c595c5f7f6a6278e137410fea92d15f28/whisper-large-sme.pt"
7
+ whisper.tokeniz