broadfield-dev commited on
Commit
c1f14d7
·
verified ·
1 Parent(s): 62621e4

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ js = """
3
+ alert("aaa")
4
+ console.log("bbb Loaded.")
5
+ """
6
+
7
+ with gr.Blocks() as demo:
8
+ inp = gr.Textbox(label="Input")
9
+ out = gr.Textbox(label="Output")
10
+
11
+ def reverse_text(text):
12
+ return text[::-1]
13
+
14
+ inp.change(reverse_text, inp, out)
15
+ demo.load(None,None,None,js=js)
16
+ demo.launch()