Mohssinibra commited on
Commit
d27a60f
·
verified ·
1 Parent(s): 99a86ff
Files changed (1) hide show
  1. app.py +5 -1
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)