File size: 348 Bytes
c1f14d7
1f5597a
99eab75
 
1f5597a
99eab75
c1f14d7
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import gradio as gr
js = """function fn() {
    alert("aaa")
    console.log("bbb Loaded.")
};
fn()
"""

with gr.Blocks() as demo:
    inp = gr.Textbox(label="Input")
    out = gr.Textbox(label="Output")

    def reverse_text(text):
        return text[::-1]

    inp.change(reverse_text, inp, out)
    demo.load(None,None,None,js=js)
demo.launch()