Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -60,15 +60,13 @@ def transcribe(path):
|
|
| 60 |
|
| 61 |
dir_path = "samples"
|
| 62 |
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 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)
|
|
|
|
|
|