ak3ra commited on
Commit
15d54bf
1 Parent(s): d8b3564

Update app.py

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