Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -12,15 +12,17 @@ from bambara_utils import BambaraWhisperTokenizer
|
|
12 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
13 |
|
14 |
# Define the model checkpoint and language
|
15 |
-
model_checkpoint = "oza75/whisper-bambara-asr-002"
|
16 |
-
revision = "831cd15ed74a554caac9f304cf50dc773841ba1b"
|
17 |
-
|
18 |
-
|
19 |
-
language = "bambara"
|
|
|
20 |
|
21 |
|
22 |
# Load the custom tokenizer designed for Bambara and the ASR model
|
23 |
-
tokenizer = BambaraWhisperTokenizer.from_pretrained(model_checkpoint, language=language, device=device)
|
|
|
24 |
pipe = pipeline(model=model_checkpoint, tokenizer=tokenizer, device=device, revision=revision)
|
25 |
|
26 |
|
|
|
12 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
13 |
|
14 |
# Define the model checkpoint and language
|
15 |
+
#model_checkpoint = "oza75/whisper-bambara-asr-002"
|
16 |
+
#revision = "831cd15ed74a554caac9f304cf50dc773841ba1b"
|
17 |
+
model_checkpoint = "oza75/whisper-bambara-asr-004"
|
18 |
+
revision = "592afa6d2e60bf7b2f2556e14852c2fadd3bc106"
|
19 |
+
# language = "bambara"
|
20 |
+
language = "icelandic"
|
21 |
|
22 |
|
23 |
# Load the custom tokenizer designed for Bambara and the ASR model
|
24 |
+
#tokenizer = BambaraWhisperTokenizer.from_pretrained(model_checkpoint, language=language, device=device)
|
25 |
+
tokenizer = WhisperTokenizer.from_pretrained(model_checkpoint, language=language, device=device)
|
26 |
pipe = pipeline(model=model_checkpoint, tokenizer=tokenizer, device=device, revision=revision)
|
27 |
|
28 |
|