Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -10,10 +10,14 @@ import time
|
|
10 |
#Loading the model and the tokenizer
|
11 |
token_key = os.environ.get("HUGGING_FACE_HUB_TOKEN")
|
12 |
|
13 |
-
model_name = "pgilles/
|
14 |
|
15 |
-
|
16 |
-
|
|
|
|
|
|
|
|
|
17 |
|
18 |
def load_data(input_file):
|
19 |
|
|
|
10 |
#Loading the model and the tokenizer
|
11 |
token_key = os.environ.get("HUGGING_FACE_HUB_TOKEN")
|
12 |
|
13 |
+
model_name = "pgilles/Wav2Vec2-large-xlsr-1b-LUXEMBOURGISH33-with-LM"
|
14 |
|
15 |
+
tokenizer = Wav2Vec2CTCTokenizer.from_pretrained(model_name, use_auth_token=token_key)
|
16 |
+
model = Wav2Vec2ForCTC.from_pretrained(model_name, use_auth_token=token_key)
|
17 |
+
processor = Wav2Vec2ProcessorWithLM.from_pretrained(model_name, use_auth_token=token_key)
|
18 |
+
|
19 |
+
|
20 |
+
p = pipeline("automatic-speech-recognition", model=model, tokenizer=tokenizer, feature_extractor=processor.feature_extractor, decoder=processor.decoder, use_auth_token=token_key)
|
21 |
|
22 |
def load_data(input_file):
|
23 |
|