File size: 891 Bytes
dd2b02c
72390b0
dd2b02c
 
72390b0
7a73b7f
2624e4a
72390b0
d4d3d57
 
 
 
 
 
 
 
 
 
 
 
93555f9
d4d3d57
93555f9
d4d3d57
93555f9
d4d3d57
79be1a5
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import gradio as gr

def greet(name):
    return "Hello " + name + "!!"

#iface = gr.Interface(fn=greet, inputs="text", outputs="text")
#iface.launch()

from datasets import load_dataset
ds = load_dataset("language-and-voice-lab/samromur_asr")

#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)


#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