Spaces:
Configuration error
Configuration error
Create app.py
Browse files
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()
|