Update app.py
Browse files
app.py
CHANGED
@@ -21,14 +21,14 @@ from datasets import load_dataset, Audio, disable_caching, set_caching_enabled
|
|
21 |
set_caching_enabled(False)
|
22 |
disable_caching()
|
23 |
|
24 |
-
p = pipeline("automatic-speech-recognition")
|
25 |
|
26 |
#config = AutoConfig.from_pretrained('whisper-small')
|
27 |
|
28 |
huggingface_token = os.environ["huggingface_token"]
|
29 |
|
30 |
-
whisper_miso=WhisperModel.from_pretrained("mskov/whisper_miso", use_auth_token=huggingface_token, device_map="auto")
|
31 |
miso_tokenizer = WhisperTokenizer.from_pretrained("mskov/whisper_miso", use_auth_token=huggingface_token)
|
|
|
|
|
32 |
#miso_tokenizer = WhisperTokenizer.from_pretrained("openai/whisper-small", use_auth_token=huggingface_token)
|
33 |
|
34 |
|
@@ -42,7 +42,7 @@ results = task_evaluator.compute(
|
|
42 |
model_or_pipeline=whisper_miso,
|
43 |
#model_or_pipeline="mskov/whisper-small.en",
|
44 |
data=dataset,
|
45 |
-
tokenizer=miso_tokenizer,
|
46 |
input_column="audio",
|
47 |
label_column="audio",
|
48 |
# device=None,
|
|
|
21 |
set_caching_enabled(False)
|
22 |
disable_caching()
|
23 |
|
|
|
24 |
|
25 |
#config = AutoConfig.from_pretrained('whisper-small')
|
26 |
|
27 |
huggingface_token = os.environ["huggingface_token"]
|
28 |
|
|
|
29 |
miso_tokenizer = WhisperTokenizer.from_pretrained("mskov/whisper_miso", use_auth_token=huggingface_token)
|
30 |
+
whisper_miso=WhisperModel.from_pretrained("mskov/whisper_miso", use_auth_token=huggingface_token, device_map="auto", tokenizer=miso_tokenizer)
|
31 |
+
|
32 |
#miso_tokenizer = WhisperTokenizer.from_pretrained("openai/whisper-small", use_auth_token=huggingface_token)
|
33 |
|
34 |
|
|
|
42 |
model_or_pipeline=whisper_miso,
|
43 |
#model_or_pipeline="mskov/whisper-small.en",
|
44 |
data=dataset,
|
45 |
+
#tokenizer=miso_tokenizer,
|
46 |
input_column="audio",
|
47 |
label_column="audio",
|
48 |
# device=None,
|