Spaces:
Runtime error
Runtime error
Commit
·
d192eda
1
Parent(s):
55b0da0
doodling around
Browse files
app.py
CHANGED
|
@@ -1,7 +1,22 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
def greet(name):
|
| 4 |
-
return "Hello " + name + "!!"
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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()
|