chatinterface_streaming_echo_test / messages_testcase.py
aliabd's picture
aliabd HF staff
Upload folder using huggingface_hub
49e9ce2 verified
raw
history blame
No virus
271 Bytes
import time
import gradio as gr
def slow_echo(message, history):
for i in range(len(message)):
time.sleep(0.05)
yield "You typed: " + message[: i + 1]
demo = gr.ChatInterface(slow_echo, type="messages")
if __name__ == "__main__":
demo.launch()