Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -10,13 +10,12 @@ import time
|
|
10 |
#Loading the model and the tokenizer
|
11 |
token_key = os.environ.get("HUGGING_FACE_HUB_TOKEN")
|
12 |
|
13 |
-
model_name = "unilux/whisper-large-v2-
|
14 |
|
15 |
#p = pipeline("automatic-speech-recognition", model=model, tokenizer=tokenizer, feature_extractor=processor.feature_extractor, decoder=processor.decoder, use_auth_token=token_key)
|
16 |
-
#pipe = pipeline("automatic-speech-recognition", model=model_name, lang="Luxembourgish", device=0, use_auth_token=token_key)
|
17 |
-
pipe = pipeline("automatic-speech-recognition", model=model_name, device=0, use_auth_token=token_key)
|
18 |
|
19 |
-
pipe
|
|
|
20 |
|
21 |
def load_data(input_file):
|
22 |
|
|
|
10 |
#Loading the model and the tokenizer
|
11 |
token_key = os.environ.get("HUGGING_FACE_HUB_TOKEN")
|
12 |
|
13 |
+
model_name = "unilux/whisper-large-v2-lb_cased_02"
|
14 |
|
15 |
#p = pipeline("automatic-speech-recognition", model=model, tokenizer=tokenizer, feature_extractor=processor.feature_extractor, decoder=processor.decoder, use_auth_token=token_key)
|
|
|
|
|
16 |
|
17 |
+
pipe = pipeline("automatic-speech-recognition", model=model_name, device=0, use_auth_token=token_key)
|
18 |
+
pipe.model.config.forced_decoder_ids = pipe.tokenizer.get_decoder_prompt_ids(language= "Luxembourgish", task="transcribe")
|
19 |
|
20 |
def load_data(input_file):
|
21 |
|