Spaces:
Running
Running
sub2
Browse files
app.py
CHANGED
@@ -48,8 +48,12 @@ def translate_text(text):
|
|
48 |
demo = gr.Interface(fn=transcribe_audio,
|
49 |
inputs=gr.Audio(type="filepath"), # Corrected input component
|
50 |
outputs=["text", "text"], # Both transcription and translation outputs
|
51 |
-
live=False
|
|
|
|
|
52 |
|
|
|
53 |
demo.add_button("Submit")
|
|
|
54 |
demo.launch()
|
55 |
demo.launch(api=True, share=True)
|
|
|
48 |
demo = gr.Interface(fn=transcribe_audio,
|
49 |
inputs=gr.Audio(type="filepath"), # Corrected input component
|
50 |
outputs=["text", "text"], # Both transcription and translation outputs
|
51 |
+
live=False, # Disable live to prevent automatic execution
|
52 |
+
title="Speech-to-Text and Translation",
|
53 |
+
description="Upload an audio file to transcribe and translate it from Darija to English.")
|
54 |
|
55 |
+
# Add a submit button
|
56 |
demo.add_button("Submit")
|
57 |
+
|
58 |
demo.launch()
|
59 |
demo.launch(api=True, share=True)
|