import json import fn import gradio as gr def fn_run(): return json.dumps(fn.run()) with gr.Blocks() as demo: info = gr.Markdown() run_button = gr.Button(value='run') run_button.click( fn=fn_run, outputs=[info], ) if __name__ == '__main__': demo.launch()