Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -31,6 +31,7 @@ def process_inputs(source_lang, target_lang, model, task, audio_mic, audio_uploa
|
|
31 |
audio = audio_mic
|
32 |
elif audio_upload:
|
33 |
audio = audio_upload
|
|
|
34 |
response = vr.process_audio_recognition(model=model, audio_path=audio, source_lang=get_iso_code(source_lang),
|
35 |
target_lang=get_iso_code(target_lang), translate= task == "Transcript and Translate")
|
36 |
return response
|
@@ -44,7 +45,7 @@ def process_inputs(source_lang, target_lang, model, task, audio_mic, audio_uploa
|
|
44 |
|
45 |
|
46 |
# Gradio interface setup
|
47 |
-
with gr.Blocks(title = "Voice Transcription"
|
48 |
with gr.Row():
|
49 |
# Dropdown for source and target languages (display name, return ISO code)
|
50 |
source_lang_dropdown = gr.Dropdown(label="Source Language", choices=source_languages, value="English")
|
@@ -76,4 +77,4 @@ with gr.Blocks(title = "Voice Transcription", theme = gr.themes.Soft()) as demo:
|
|
76 |
|
77 |
if __name__ == '__main__':
|
78 |
# check the model rate
|
79 |
-
demo.launch(favicon_path = "
|
|
|
31 |
audio = audio_mic
|
32 |
elif audio_upload:
|
33 |
audio = audio_upload
|
34 |
+
print(audio)
|
35 |
response = vr.process_audio_recognition(model=model, audio_path=audio, source_lang=get_iso_code(source_lang),
|
36 |
target_lang=get_iso_code(target_lang), translate= task == "Transcript and Translate")
|
37 |
return response
|
|
|
45 |
|
46 |
|
47 |
# Gradio interface setup
|
48 |
+
with gr.Blocks(title = "Voice Transcription") as demo:
|
49 |
with gr.Row():
|
50 |
# Dropdown for source and target languages (display name, return ISO code)
|
51 |
source_lang_dropdown = gr.Dropdown(label="Source Language", choices=source_languages, value="English")
|
|
|
77 |
|
78 |
if __name__ == '__main__':
|
79 |
# check the model rate
|
80 |
+
demo.launch(favicon_path = "favicon.ico")
|