Spaces:
Sleeping
Sleeping
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() |