Spaces:
Build error
Build error
camparchimedes
commited on
Commit
•
efea11e
1
Parent(s):
a95b479
Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ def transcribe_audio(audio_file, forced_decoder_ids):
|
|
37 |
forced_decoder_ids = processor.get_decoder_prompt_ids(language=language, task=task)
|
38 |
# check if still the case...........??*********************************************
|
39 |
# "You have passed task=transcribe, but also have set `forced_decoder_ids` to [[1, 50288], [2, 50360], [3, 50364]] which creates a conflict. `forced_decoder_ids` will be ignored in favor of task=transcribe."
|
40 |
-
|
41 |
with torch.no_grad():
|
42 |
output = pipe(audio_file, chunk_length_s=30, generate_kwargs={"forced_decoder_ids”: forced_decoder_ids"})
|
43 |
|
@@ -206,13 +206,14 @@ banner_html = """
|
|
206 |
iface = gr.Interface(
|
207 |
fn=transcribe_audio,
|
208 |
inputs=gr.Audio(type="filepath"),
|
209 |
-
outputs="
|
210 |
title="SW Transcription App",
|
211 |
description="Upload an audio file to get the text",
|
212 |
theme="default",
|
213 |
live=False
|
214 |
)
|
215 |
|
|
|
216 |
iface = gr.Blocks()
|
217 |
|
218 |
with iface:
|
|
|
37 |
forced_decoder_ids = processor.get_decoder_prompt_ids(language=language, task=task)
|
38 |
# check if still the case...........??*********************************************
|
39 |
# "You have passed task=transcribe, but also have set `forced_decoder_ids` to [[1, 50288], [2, 50360], [3, 50364]] which creates a conflict. `forced_decoder_ids` will be ignored in favor of task=transcribe."
|
40 |
+
|
41 |
with torch.no_grad():
|
42 |
output = pipe(audio_file, chunk_length_s=30, generate_kwargs={"forced_decoder_ids”: forced_decoder_ids"})
|
43 |
|
|
|
206 |
iface = gr.Interface(
|
207 |
fn=transcribe_audio,
|
208 |
inputs=gr.Audio(type="filepath"),
|
209 |
+
outputs=gr.Textbox(label="Transcription"), # Corrected component
|
210 |
title="SW Transcription App",
|
211 |
description="Upload an audio file to get the text",
|
212 |
theme="default",
|
213 |
live=False
|
214 |
)
|
215 |
|
216 |
+
|
217 |
iface = gr.Blocks()
|
218 |
|
219 |
with iface:
|