Spaces:
Runtime error
Runtime error
Ahsen Khaliq
commited on
Commit
•
a97d8ed
1
Parent(s):
baa6ec4
Update app.py
Browse files
app.py
CHANGED
@@ -44,5 +44,17 @@ def inference(audio):
|
|
44 |
plt.show()
|
45 |
print(f"ASR hypothesis: {text_normalizer(text)}")
|
46 |
print("*" * 50)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
|
|
|
44 |
plt.show()
|
45 |
print(f"ASR hypothesis: {text_normalizer(text)}")
|
46 |
print("*" * 50)
|
47 |
+
|
48 |
+
inputs = gr.inputs.Audio(label="Input Audio", type="file")
|
49 |
+
outputs = gr.outputs.Textbox(label="Output Text")
|
50 |
+
|
51 |
+
title = "wav2vec 2.0"
|
52 |
+
description = "demo for Facebook AI wav2vec 2.0 using Hugging Face transformers. To use it, simply upload your audio, or click one of the examples to load them. Read more at the links below."
|
53 |
+
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2006.11477'>wav2vec 2.0: A Framework for Self-Supervised Learning of Speech Representations</a> | <a href='https://github.com/pytorch/fairseq'>Github Repo</a> | <a href='https://huggingface.co/facebook/wav2vec2-base-960h'>Hugging Face model</a></p>"
|
54 |
+
examples = [
|
55 |
+
["poem.wav"]
|
56 |
+
]
|
57 |
+
|
58 |
+
gr.Interface(inference, inputs, outputs, title=title, description=description, article=article, examples=examples).launch()
|
59 |
|
60 |
|