w2v2asr / app.py
clr's picture
Update app.py
7d31b0d
raw
history blame
1.01 kB
import gradio as gr
from datasets import load_dataset
def greet(name):
return "Hello " + name + "!!"
#iface = gr.Interface(fn=greet, inputs="text", outputs="text")
#iface.launch()
#ds = load_dataset("language-and-voice-lab/samromur_asr",split='train',streaming=True)
ds = load_dataset("language-and-voice-lab/samromur_asr",split='test')
#iface = gr.Interface.load("models/carlosdanielhernandezmena/wav2vec2-large-xlsr-53-icelandic-ep10-1000h")
#iface.launch()
def show_ex(exnum):
return(ds[exnum])
bl = gr.Blocks()
with bl:
text_input = gr.Textbox()
text_output = gr.Textbox()
text_button = gr.Button("Run")
text_button.click(show_ex, inputs=text_input, outputs=text_output)
bl.launch()
#https://mercury-docs.readthedocs.io/en/latest/deploy/hugging-face-spaces/
#https://huggingface.co/spaces/pplonski/deploy-mercury
#https://discuss.huggingface.co/t/deploy-interactive-jupyter-notebook-on-spaces-with-mercury/17000
#https://huggingface.co/docs/transformers/notebooks