Spaces:
Running
Running
jhj0517
commited on
Commit
•
0b56157
1
Parent(s):
cff2a72
edited model path
Browse files
modules/whisper_Inference.py
CHANGED
@@ -12,7 +12,7 @@ class WhisperInference:
|
|
12 |
def __init__(self):
|
13 |
print("\nInitializing Model..\n")
|
14 |
self.current_model_size = DEFAULT_MODEL_SIZE
|
15 |
-
self.model = whisper.load_model(name=DEFAULT_MODEL_SIZE, download_root="models")
|
16 |
self.available_models = whisper.available_models()
|
17 |
self.available_langs = sorted(list(whisper.tokenizer.LANGUAGES.values()))
|
18 |
|
@@ -26,7 +26,7 @@ class WhisperInference:
|
|
26 |
if model_size != self.current_model_size:
|
27 |
progress(0, desc="Initializing Model..")
|
28 |
self.current_model_size = model_size
|
29 |
-
self.model = whisper.load_model(name=model_size, download_root="models")
|
30 |
|
31 |
if lang == "Automatic Detection":
|
32 |
lang = None
|
@@ -81,7 +81,7 @@ class WhisperInference:
|
|
81 |
if model_size != self.current_model_size:
|
82 |
progress(0, desc="Initializing Model..")
|
83 |
self.current_model_size = model_size
|
84 |
-
self.model = whisper.load_model(name=model_size, download_root="models")
|
85 |
|
86 |
if lang == "Automatic Detection":
|
87 |
lang = None
|
@@ -123,7 +123,7 @@ class WhisperInference:
|
|
123 |
if model_size != self.current_model_size:
|
124 |
progress(0, desc="Initializing Model..")
|
125 |
self.current_model_size = model_size
|
126 |
-
self.model = whisper.load_model(name=model_size, download_root="models")
|
127 |
|
128 |
if lang == "Automatic Detection":
|
129 |
lang = None
|
|
|
12 |
def __init__(self):
|
13 |
print("\nInitializing Model..\n")
|
14 |
self.current_model_size = DEFAULT_MODEL_SIZE
|
15 |
+
self.model = whisper.load_model(name=DEFAULT_MODEL_SIZE, download_root="models/Whisper")
|
16 |
self.available_models = whisper.available_models()
|
17 |
self.available_langs = sorted(list(whisper.tokenizer.LANGUAGES.values()))
|
18 |
|
|
|
26 |
if model_size != self.current_model_size:
|
27 |
progress(0, desc="Initializing Model..")
|
28 |
self.current_model_size = model_size
|
29 |
+
self.model = whisper.load_model(name=model_size, download_root="models/Whisper")
|
30 |
|
31 |
if lang == "Automatic Detection":
|
32 |
lang = None
|
|
|
81 |
if model_size != self.current_model_size:
|
82 |
progress(0, desc="Initializing Model..")
|
83 |
self.current_model_size = model_size
|
84 |
+
self.model = whisper.load_model(name=model_size, download_root="models/Whisper")
|
85 |
|
86 |
if lang == "Automatic Detection":
|
87 |
lang = None
|
|
|
123 |
if model_size != self.current_model_size:
|
124 |
progress(0, desc="Initializing Model..")
|
125 |
self.current_model_size = model_size
|
126 |
+
self.model = whisper.load_model(name=model_size, download_root="models/Whisper")
|
127 |
|
128 |
if lang == "Automatic Detection":
|
129 |
lang = None
|