Update app.py
Browse files
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")
|