Spaces:
Running
Running
Jan van Doorn
commited on
Commit
·
98213bd
1
Parent(s):
3e4bee4
Updated to use local model
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import gradio as gr
|
|
4 |
import os
|
5 |
|
6 |
#%%
|
7 |
-
whisper = pipeline(model='
|
8 |
bert_atco_ner = pipeline(model='Jzuluaga/bert-base-ner-atc-en-atco2-1h')
|
9 |
|
10 |
#%%
|
@@ -49,8 +49,8 @@ iface = gr.Interface(
|
|
49 |
fn=transcribeAndExtract,
|
50 |
inputs=[gr.Audio(source='upload', type='filepath'), gr.Audio(source='microphone', type='filepath'), gr.Checkbox(label='Transcribe only', default=False)],
|
51 |
outputs=[gr.Text(label='Transcription'), gr.Text(label='Callsigns, commands and values')],
|
52 |
-
title='Whisper Large v2 - ATCO2-
|
53 |
-
description='This demo will transcribe ATC audio files by using the Whisper Large v2 model fine-tuned on the ATCO2 and
|
54 |
)
|
55 |
|
56 |
#%%
|
|
|
4 |
import os
|
5 |
|
6 |
#%%
|
7 |
+
whisper = pipeline(model='C:\\Users\\doornj\\Desktop\\WhisperANSP\\Models\\whisper-large-v2-atco2-asr-atcosim-ANSP-3h1m', task='automatic-speech-recognition')
|
8 |
bert_atco_ner = pipeline(model='Jzuluaga/bert-base-ner-atc-en-atco2-1h')
|
9 |
|
10 |
#%%
|
|
|
49 |
fn=transcribeAndExtract,
|
50 |
inputs=[gr.Audio(source='upload', type='filepath'), gr.Audio(source='microphone', type='filepath'), gr.Checkbox(label='Transcribe only', default=False)],
|
51 |
outputs=[gr.Text(label='Transcription'), gr.Text(label='Callsigns, commands and values')],
|
52 |
+
title='Whisper Large v2 - ATCO2-ATCOSIM-ANSP',
|
53 |
+
description='This demo will transcribe ATC audio files by using the Whisper Large v2 model fine-tuned on the ATCO2, ATCOSIM and ANSP datasets. Further it uses a Named Entity Recognition model to extract callsigns, commands and values from the transcription. This model is based on Google\'s BERT model and fine-tuned on the ATCO2 dataset.',
|
54 |
)
|
55 |
|
56 |
#%%
|