Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,23 +1,20 @@
|
|
1 |
import gradio as gr
|
2 |
-
import
|
3 |
-
from asr import transcribe_auto, ASR_EXAMPLES, ASR_NOTE # Modify transcribe_auto to auto-detect language
|
4 |
|
5 |
-
# Speech-to-Text Interface
|
6 |
mms_transcribe = gr.Interface(
|
7 |
-
fn=transcribe_auto,
|
8 |
inputs=gr.Audio(),
|
9 |
outputs="text",
|
10 |
-
|
11 |
-
|
12 |
-
description="Automatically transcribes audio in either English or Swahili.",
|
13 |
-
article=ASR_NOTE,
|
14 |
allow_flagging="never",
|
15 |
)
|
16 |
|
17 |
# Main Gradio App
|
18 |
with gr.Blocks() as demo:
|
19 |
gr.Markdown("<p align='center' style='font-size: 20px;'>MMS Speech-to-Text</p>")
|
20 |
-
gr.HTML("<center>
|
21 |
|
22 |
mms_transcribe.render()
|
23 |
|
|
|
1 |
import gradio as gr
|
2 |
+
from asr import transcribe_auto # Import the updated function
|
|
|
3 |
|
4 |
+
# Speech-to-Text Interface
|
5 |
mms_transcribe = gr.Interface(
|
6 |
+
fn=transcribe_auto,
|
7 |
inputs=gr.Audio(),
|
8 |
outputs="text",
|
9 |
+
title="Multilingual Speech-to-Text",
|
10 |
+
description="Automatically detects and transcribes English or Swahili speech.",
|
|
|
|
|
11 |
allow_flagging="never",
|
12 |
)
|
13 |
|
14 |
# Main Gradio App
|
15 |
with gr.Blocks() as demo:
|
16 |
gr.Markdown("<p align='center' style='font-size: 20px;'>MMS Speech-to-Text</p>")
|
17 |
+
gr.HTML("<center>Upload or record audio. The model will automatically detect the language (English or Swahili) and transcribe.</center>")
|
18 |
|
19 |
mms_transcribe.render()
|
20 |
|