import gradio as gr def fun(): msg = "This is sample markdown message" return msg, msg with gr.Blocks() as demo: b1 =gr.Button() text_out = gr.Textbox() html_out = gr.HTML() b1.click(fun, [], [text_out, html_out]) demo.launch()