Spaces:
Runtime error
Runtime error
Download app.py(run_error) from Futuresony/Project_1: direct link, hf CLI and curl.
- Browser
- Download file 741 Bytes
-
https://huggingface.co/spaces/Futuresony/Project_1/resolve/main/app.py(run_error)
- Command line
-
hf download 'hf://spaces/Futuresony/Project_1/app.py(run_error)'
-
curl -L -o 'app.py(run_error)' 'https://huggingface.co/spaces/Futuresony/Project_1/resolve/main/app.py(run_error)'
741 Bytes
| import gradio as gr | |
| # One and two | |
| from asr import transcribe_auto # Import the updated function | |
| # Speech-to-Text Interface | |
| mms_transcribe = gr.Interface( | |
| fn=transcribe_auto, | |
| inputs=gr.Audio(), | |
| outputs="text", | |
| title="Multilingual Speech-to-Text", | |
| description="Automatically detects and transcribes English or Swahili speech.", | |
| allow_flagging="never", | |
| ) | |
| # Main Gradio App | |
| with gr.Blocks() as demo: | |
| gr.Markdown("<p align='center' style='font-size: 20px;'>MMS Speech-to-Text</p>") | |
| gr.HTML("<center>Upload or record audio. The model will automatically detect the language (English or Swahili) and transcribe.</center>") | |
| mms_transcribe.render() | |
| if __name__ == "__main__": | |
| demo.queue() | |
| demo.launch() |