import time import gradio as gr def test(message): for i in range(len(message)): time.sleep(0.3) yield message[: i + 1] gr.Interface(test, "textbox", "textbox")