jlvdoorn commited on
Commit
125f0d6
1 Parent(s): 2ce74f8

new attempt

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -5,15 +5,15 @@ 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
- ttl = 'Whisper Large v2 - ATCO2-ATCOSIM-ANSP'
11
- dis = 'This demo will transcribe ATC audio files by using the Whisper Large v2 model fine-tuned on the ATCO2, ATCOSIM and ANSP datasets. \n \n Further it uses a Named Entity Recognition model to extract callsigns, commands and values from the transcription. \n This model is based on Google\'s BERT model and fine-tuned on the ATCO2 dataset.'
12
 
13
- except:
14
- whisper = pipeline(model='jlvdoorn/whisper-large-v2-atco2-asr-atcosim', use_auth_token=os.environ['hf_token'], task='automatic-speech-recognition')
15
- ttl = 'Whisper Large v2 - ATCO2-ATCOSIM'
16
- dis = 'This demo will transcribe ATC audio files by using the Whisper Large v2 model fine-tuned on the ATCO2 and ATCOSIM datasets. \n \n Further it uses a Named Entity Recognition model to extract callsigns, commands and values from the transcription. \n This model is based on Google\'s BERT model and fine-tuned on the ATCO2 dataset.'
17
 
18
  bert_atco_ner = pipeline(model='Jzuluaga/bert-base-ner-atc-en-atco2-1h')
19
 
 
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
+ # ttl = 'Whisper Large v2 - ATCO2-ATCOSIM-ANSP'
11
+ # dis = 'This demo will transcribe ATC audio files by using the Whisper Large v2 model fine-tuned on the ATCO2, ATCOSIM and ANSP datasets. \n \n Further it uses a Named Entity Recognition model to extract callsigns, commands and values from the transcription. \n This model is based on Google\'s BERT model and fine-tuned on the ATCO2 dataset.'
12
 
13
+ # except:
14
+ whisper = pipeline(model='jlvdoorn/whisper-large-v2-atco2-asr-atcosim', use_auth_token=os.environ['hf_token'], task='automatic-speech-recognition')
15
+ ttl = 'Whisper Large v2 - ATCO2-ATCOSIM'
16
+ dis = 'This demo will transcribe ATC audio files by using the Whisper Large v2 model fine-tuned on the ATCO2 and ATCOSIM datasets. \n \n Further it uses a Named Entity Recognition model to extract callsigns, commands and values from the transcription. \n This model is based on Google\'s BERT model and fine-tuned on the ATCO2 dataset.'
17
 
18
  bert_atco_ner = pipeline(model='Jzuluaga/bert-base-ner-atc-en-atco2-1h')
19