import gradio as gr def show_warning(): print("should show: This is a warning message.") gr.Warning("This is a warning message.") with gr.Blocks() as demo: flash_timer = gr.Timer( 1, active=True, ) flash_timer.tick( show_warning, inputs=[], outputs=[], ) demo.launch()