dawood HF staff commited on
Commit
4bdb0b3
1 Parent(s): ff8a704

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -0
app.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def flip_text(x):
4
+ return x[::-1]
5
+
6
+ demo = gr.Blocks()
7
+
8
+ with demo:
9
+ gr.Markdown(
10
+ """
11
+ # Flip Text!
12
+ Start typing below to see the output.
13
+ """)
14
+ inp = gr.Textbox(placeholder="Flip this text")
15
+ out = gr.Textbox()
16
+
17
+ inp.change(fn=flip_text,
18
+ inputs=inp,
19
+ outputs=out)
20
+
21
+ demo.launch()