Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,11 +9,11 @@ import os
|
|
9 |
# iso_codes = json.load(file)
|
10 |
|
11 |
languages = ["lug", "ach", "nyn", "teo"]
|
12 |
-
auth_token = os.environ.get("HF_TOKEN")
|
13 |
|
14 |
model_id = "Sunbird/sunbird-mms"
|
15 |
-
processor = AutoProcessor.from_pretrained(model_id, use_auth_token=
|
16 |
-
model = Wav2Vec2ForCTC.from_pretrained(model_id, use_auth_token=
|
17 |
|
18 |
def transcribe(audio_file_mic=None, audio_file_upload=None, language="Luganda (lug)"):
|
19 |
if audio_file_mic:
|
|
|
9 |
# iso_codes = json.load(file)
|
10 |
|
11 |
languages = ["lug", "ach", "nyn", "teo"]
|
12 |
+
auth_token = os.environ.get("HF_TOKEN")
|
13 |
|
14 |
model_id = "Sunbird/sunbird-mms"
|
15 |
+
processor = AutoProcessor.from_pretrained(model_id, use_auth_token=True)
|
16 |
+
model = Wav2Vec2ForCTC.from_pretrained(model_id, use_auth_token=True)
|
17 |
|
18 |
def transcribe(audio_file_mic=None, audio_file_upload=None, language="Luganda (lug)"):
|
19 |
if audio_file_mic:
|