deepdml commited on
Commit
7cc61e0
·
verified ·
1 Parent(s): d6c53fc

Create utils_display.py

Browse files
Files changed (1) hide show
  1. utils_display.py +30 -0
utils_display.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ def make_clickable_model(model_name):
3
+ model_name_list = model_name.split("/")
4
+ if model_name_list[0] == "trt-llm":
5
+ link = "https://github.com/NVIDIA/TensorRT-LLM/tree/main/examples/whisper"
6
+ elif model_name_list[0] == "faster-whisper":
7
+ link = "https://github.com/guillaumekln/faster-whisper"
8
+ elif model_name_list[0] == "Whisper.cpp":
9
+ link = "https://github.com/ggerganov/whisper.cpp"
10
+ elif model_name_list[0] == "WhisperKit":
11
+ link = "https://github.com/argmaxinc/WhisperKit"
12
+ elif model_name_list[0] == "WhisperMLX":
13
+ link = "https://huggingface.co/collections/mlx-community/whisper-663256f9964fbb1177db93dc"
14
+ elif model_name_list[0] == "elevenlabs":
15
+ link = "https://elevenlabs.io/speech-to-text"
16
+ elif model_name_list[0] == "openai" and (model_name_list[1] == "whisper-1" or model_name_list[1] == "gpt-4o-transcribe" or model_name_list[1] == "gpt-4o-mini-transcribe"):
17
+ link = "https://platform.openai.com/docs/guides/speech-to-text"
18
+ elif model_name_list[0] == "assemblyai":
19
+ link = "https://www.assemblyai.com/docs"
20
+ elif model_name_list[0] == "revai":
21
+ link = "https://docs.rev.ai/api/asynchronous/get-started/"
22
+ elif model_name_list[0] == "speechmatics":
23
+ link = "https://www.speechmatics.com/"
24
+ elif model_name_list[0] == "ultravox":
25
+ link = "https://huggingface.co/fixie-ai"
26
+ elif model_name_list[0] == "aquavoice":
27
+ link = "https://aquavoice.com/blog/introducing-avalon"
28
+ else:
29
+ link = f"https://huggingface.co/{model_name}"
30
+ return f'<a target="_blank" href="{link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{model_name}</a>'