Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,22 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
|
4 |
-
def
|
5 |
-
return
|
6 |
|
7 |
|
8 |
-
demo = gr.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
demo.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()
|