Update run.py
Browse files12345674567891011121314915161718import timeimport gradio as gr
def slow_echo(message, history): for i in range(len(message)): time.sleep(0.05) yield "You typed: " + message[: i+1]def slow_echo(stringNum, history): try: num = int(stringNum) yield stringNum while num > 0: yield str(num) num -= 1 yield "0 - Countdown done!" except ValueError: yield "Error: Message not int."
demo = gr.ChatInterface(slow_echo).queue()demo = gr.ChatInterface(timer).queue()
if __name__ == "__main__": demo.launch()run.py+11-5