Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| def flip_text(x): | |
| return x[::-1] | |
| demo = gr.Blocks() | |
| with demo: | |
| gr.Markdown( | |
| """ | |
| # Flip Text! | |
| Start typing below to see the output. | |
| """ | |
| ) | |
| input = gr.Textbox(placeholder="Flip this text") | |
| output = gr.Textbox() | |
| input.change(fn=flip_text, inputs=input, outputs=output) | |
| demo.launch() |