Spaces:
Sleeping
Sleeping
Update bleep_that_sht/transcribe.py
Browse files
bleep_that_sht/transcribe.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
import whisper_timestamped as whisper
|
2 |
from typing import Tuple
|
3 |
-
import spaces
|
4 |
|
5 |
avaliable_models = ["tiny", "base", "small", "medium", "large-v3"]
|
6 |
|
7 |
-
@spaces.GPU(duration=90)
|
8 |
def transcribe(local_file_path: str, model: str = "tiny", device: str = "cpu") -> Tuple[str, dict]:
|
9 |
assert model in avaliable_models, f"input model '{model}' not a member of available models = {avaliable_models}"
|
10 |
model = whisper.load_model(model, device="cpu")
|
|
|
1 |
import whisper_timestamped as whisper
|
2 |
from typing import Tuple
|
3 |
+
# import spaces
|
4 |
|
5 |
avaliable_models = ["tiny", "base", "small", "medium", "large-v3"]
|
6 |
|
7 |
+
# @spaces.GPU(duration=90)
|
8 |
def transcribe(local_file_path: str, model: str = "tiny", device: str = "cpu") -> Tuple[str, dict]:
|
9 |
assert model in avaliable_models, f"input model '{model}' not a member of available models = {avaliable_models}"
|
10 |
model = whisper.load_model(model, device="cpu")
|