Spaces:
Runtime error
Runtime error
Commit
·
86634ef
1
Parent(s):
cb3b29f
Update app.py
Browse files
app.py
CHANGED
@@ -27,12 +27,13 @@ def speech_to_speech_translation(audio_filepath):
|
|
27 |
translated_text = translate(audio_dict)
|
28 |
return translated_text
|
29 |
|
30 |
-
|
31 |
-
with app:
|
32 |
-
|
33 |
-
gr.Interface(
|
34 |
-
fn=speech_to_speech_translation,
|
35 |
-
inputs=gr.Audio(source="microphone", type="filepath"),
|
36 |
-
outputs=gr.Textbox(label="Translation"),allow_flagging="never")
|
37 |
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
translated_text = translate(audio_dict)
|
28 |
return translated_text
|
29 |
|
30 |
+
demo = gr.Blocks()
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
+
mic_translate = gr.Interface(
|
33 |
+
fn=speech_to_speech_translation,
|
34 |
+
inputs=gr.Audio(source="microphone", type="filepath"),
|
35 |
+
outputs=gr.Textbox(label="Translation"),allow_flagging="never")
|
36 |
+
|
37 |
+
with demo:
|
38 |
+
gr.TabbedInterface([mic_translate], ["Local Tamil Translator"])
|
39 |
+
demo.launch(debug=True, share=False)
|