jonpreamble commited on
Commit
d192eda
·
1 Parent(s): 55b0da0

doodling around

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