mboushaba commited on
Commit
8efadfe
·
verified ·
1 Parent(s): 41a7b17

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -3,6 +3,14 @@ import librosa
3
  import numpy as np
4
  import soundfile as sf
5
  from transformers import pipeline
 
 
 
 
 
 
 
 
6
 
7
  asr_ceb = pipeline("automatic-speech-recognition", model = "sil-ai/wav2vec2-bloom-speech-ceb")
8
  asr_whisper_large = pipeline("automatic-speech-recognition", model = "openai/whisper-large-v3")
 
3
  import numpy as np
4
  import soundfile as sf
5
  from transformers import pipeline
6
+ import os
7
+ from huggingface_hub import login
8
+
9
+ # Retrieve token from environment variable
10
+ hugging_face_token = os.getenv("ASR_CEB_HUGGING_FACE_TOKEN")
11
+
12
+ # Login using the token
13
+ login(token=hugging_face_token)
14
 
15
  asr_ceb = pipeline("automatic-speech-recognition", model = "sil-ai/wav2vec2-bloom-speech-ceb")
16
  asr_whisper_large = pipeline("automatic-speech-recognition", model = "openai/whisper-large-v3")