Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -105,7 +105,7 @@ def transcribe_audio(audio_file, chunk_length_s=30):
|
|
105 |
chunk_waveform = torch.mean(chunk_waveform, dim=0, keepdim=True)
|
106 |
|
107 |
# Process the chunk with the tokenizer
|
108 |
-
processor =
|
109 |
inputs = processor(chunk_waveform.squeeze(0).numpy(), sampling_rate=sample_rate, return_tensors="pt")
|
110 |
|
111 |
input_features = inputs.input_features
|
@@ -259,7 +259,7 @@ def save_to_pdf(text, summary):
|
|
259 |
iface = gr.Blocks()
|
260 |
|
261 |
with iface:
|
262 |
-
gr.HTML('<img src="https://huggingface.co/spaces/camparchimedes/ola_s-audioshop/
|
263 |
gr.Markdown("**Switch Work's JoJo-versjon som webapp for transkribering av lydfiler til norsk skrift. Språkmodell: NbAiLab/nb-whisper-large, Ekstra: oppsummering, pdf-download**")
|
264 |
|
265 |
with gr.Tabs():
|
|
|
105 |
chunk_waveform = torch.mean(chunk_waveform, dim=0, keepdim=True)
|
106 |
|
107 |
# Process the chunk with the tokenizer
|
108 |
+
processor = processor.add_special_tokens({'pad_token': '[PAD]'})
|
109 |
inputs = processor(chunk_waveform.squeeze(0).numpy(), sampling_rate=sample_rate, return_tensors="pt")
|
110 |
|
111 |
input_features = inputs.input_features
|
|
|
259 |
iface = gr.Blocks()
|
260 |
|
261 |
with iface:
|
262 |
+
gr.HTML('<img src="https://huggingface.co/spaces/camparchimedes/ola_s-audioshop/blob/main/banner_trans.png" width="100%" height="auto"/>')
|
263 |
gr.Markdown("**Switch Work's JoJo-versjon som webapp for transkribering av lydfiler til norsk skrift. Språkmodell: NbAiLab/nb-whisper-large, Ekstra: oppsummering, pdf-download**")
|
264 |
|
265 |
with gr.Tabs():
|