oarab commited on
Commit
4f45356
·
verified ·
1 Parent(s): b8201e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -12
app.py CHANGED
@@ -60,15 +60,13 @@ def transcribe(path):
60
 
61
  dir_path = "samples"
62
 
63
- with grpc_server.RuntimeGRPCServer() as backend:
64
- gr.Interface(
65
- fn=transcribe,
66
- inputs=gr.Microphone(type="filepath", format="mp3"),
67
- outputs=[ gr.Textbox(label="Default model text"), gr.Textbox(label="Transcription"), gr.Textbox(label="Probabilities") ],
68
- title="Speech to text demo",
69
- allow_flagging="never",
70
- description = "This demos sends the same audio to the HuggingFace automatic-speech-recognition pipeline default model [facebook/wav2vec2-base-960h](https://huggingface.co/facebook/wav2vec2-base-960h) and the [jonatasgrosman/wav2vec2-large-xlsr-53-english](https://huggingface.co/jonatasgrosman/wav2vec2-large-xlsr-53-english) model.",
71
- article = "Check out [the original model](https://huggingface.co/jonatasgrosman/wav2vec2-large-xlsr-53-english).",
72
- examples= [ path.join(dir_path, file_path) for file_path in sorted(listdir(dir_path)) ]
73
- ).launch(share=True, server_port=8080)
74
- backend.wait_for_termination()
 
60
 
61
  dir_path = "samples"
62
 
63
+ gr.Interface(
64
+ fn=transcribe,
65
+ inputs=gr.Microphone(type="filepath", format="mp3"),
66
+ outputs=[ gr.Textbox(label="Default model text"), gr.Textbox(label="Transcription"), gr.Textbox(label="Probabilities") ],
67
+ title="Speech to text demo",
68
+ allow_flagging="never",
69
+ description = "This demos sends the same audio to the HuggingFace automatic-speech-recognition pipeline default model [facebook/wav2vec2-base-960h](https://huggingface.co/facebook/wav2vec2-base-960h) and the [jonatasgrosman/wav2vec2-large-xlsr-53-english](https://huggingface.co/jonatasgrosman/wav2vec2-large-xlsr-53-english) model.",
70
+ article = "Check out [the original model](https://huggingface.co/jonatasgrosman/wav2vec2-large-xlsr-53-english).",
71
+ examples= [ path.join(dir_path, file_path) for file_path in sorted(listdir(dir_path)) ]
72
+ ).launch(share=True)