Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,6 +27,7 @@ dict_languages = {"English": "en",
|
|
| 27 |
@spaces.GPU
|
| 28 |
def process_transcript(language, audio_path, model, processor):
|
| 29 |
"""Process audio with selected Voxtral model and return the generated response"""
|
|
|
|
| 30 |
if audio_path is None:
|
| 31 |
raise gr.Error("Please provide some input audio: either upload an audio file or use the microphone")
|
| 32 |
id_language = dict_languages[language]
|
|
@@ -62,7 +63,7 @@ with gr.Blocks(title="Transcription") as transcript:
|
|
| 62 |
with gr.Column():
|
| 63 |
text_transcript = gr.Textbox(label="Generated Response", lines=10)
|
| 64 |
|
| 65 |
-
|
| 66 |
submit_transcript.click(
|
| 67 |
fn=lambda v1, v2: process_transcript(model, processor, v1, v2),
|
| 68 |
inputs=[sel_language, sel_audio],
|
|
|
|
| 27 |
@spaces.GPU
|
| 28 |
def process_transcript(language, audio_path, model, processor):
|
| 29 |
"""Process audio with selected Voxtral model and return the generated response"""
|
| 30 |
+
print("audio_path:", audio_path)
|
| 31 |
if audio_path is None:
|
| 32 |
raise gr.Error("Please provide some input audio: either upload an audio file or use the microphone")
|
| 33 |
id_language = dict_languages[language]
|
|
|
|
| 63 |
with gr.Column():
|
| 64 |
text_transcript = gr.Textbox(label="Generated Response", lines=10)
|
| 65 |
|
| 66 |
+
print("sel_audio:", sel_audio)
|
| 67 |
submit_transcript.click(
|
| 68 |
fn=lambda v1, v2: process_transcript(model, processor, v1, v2),
|
| 69 |
inputs=[sel_language, sel_audio],
|