Spaces:
Runtime error
Runtime error
Commit
·
a77192d
1
Parent(s):
9ad68db
update model to latest punc-keeping model
Browse files
app.py
CHANGED
@@ -5,14 +5,20 @@ import pytube as pt
|
|
5 |
from transformers import pipeline
|
6 |
from huggingface_hub import model_info
|
7 |
|
8 |
-
MODEL_NAME = "
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
device = 0 if torch.cuda.is_available() else "cpu"
|
12 |
pipe = pipeline(
|
13 |
task="automatic-speech-recognition",
|
14 |
model=MODEL_NAME,
|
15 |
-
chunk_length_s=
|
16 |
device=device,
|
17 |
)
|
18 |
|
|
|
5 |
from transformers import pipeline
|
6 |
from huggingface_hub import model_info
|
7 |
|
8 |
+
MODEL_NAME = "bayartsogt/whisper-small-mn-7" #this always needs to stay in line 8 :D sorry for the hackiness
|
9 |
+
|
10 |
+
"""
|
11 |
+
| model_id | WER | Keep Characters |
|
12 |
+
| bayartsogt/whisper-small-mn-7 | 32.6469 | " абвгдеёжзийклмноөпрстуүфхцчшъыьэюя.,?!" |
|
13 |
+
"""
|
14 |
+
|
15 |
+
lang = "mn"
|
16 |
|
17 |
device = 0 if torch.cuda.is_available() else "cpu"
|
18 |
pipe = pipeline(
|
19 |
task="automatic-speech-recognition",
|
20 |
model=MODEL_NAME,
|
21 |
+
chunk_length_s=12, # did a little experiment looks like this is much better
|
22 |
device=device,
|
23 |
)
|
24 |
|