Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -3,11 +3,12 @@ from transformers import pipeline
|
|
3 |
import gradio as gr
|
4 |
import os
|
5 |
|
|
|
6 |
## Try to load a local model if available
|
7 |
try:
|
8 |
whisper = pipeline(model='/mnt/projects/whisper/WhisperANSP/Models/whisper-large-v2-atco2-asr-atcosim-ANSP-3h1m', task='automatic-speech-recognition')
|
9 |
except:
|
10 |
-
whisper = pipeline(model='jlvdoorn/whisper-large-v2-atco2-asr-atcosim',
|
11 |
bert_atco_ner = pipeline(model='Jzuluaga/bert-base-ner-atc-en-atco2-1h')
|
12 |
|
13 |
#%%
|
|
|
3 |
import gradio as gr
|
4 |
import os
|
5 |
|
6 |
+
print(os.environ['hf_token'])
|
7 |
## Try to load a local model if available
|
8 |
try:
|
9 |
whisper = pipeline(model='/mnt/projects/whisper/WhisperANSP/Models/whisper-large-v2-atco2-asr-atcosim-ANSP-3h1m', task='automatic-speech-recognition')
|
10 |
except:
|
11 |
+
whisper = pipeline(model='jlvdoorn/whisper-large-v2-atco2-asr-atcosim', use_auth_token=os.environ['hf_token'])
|
12 |
bert_atco_ner = pipeline(model='Jzuluaga/bert-base-ner-atc-en-atco2-1h')
|
13 |
|
14 |
#%%
|