#!/usr/bin/env python import gradio as gr with gr.Blocks() as demo: text = gr.Text() out = gr.Text() btn = gr.Button() gr.Examples(examples=['aaa', 'bbb'], inputs=text) btn.click(fn=lambda x: x, inputs=text, outputs=out, api_name='run') demo.queue().launch()