Spaces:
Runtime error
Runtime error
Download demos/chatinterface_streaming_echo/run.py from aliabd/testing-fork-prs: direct link, hf CLI and curl.
- Browser
- Download file 260 Bytes
-
https://huggingface.co/spaces/aliabd/testing-fork-prs/resolve/main/demos/chatinterface_streaming_echo/run.py
- Command line
-
hf download hf://spaces/aliabd/testing-fork-prs/demos/chatinterface_streaming_echo/run.py
-
curl -L -o run.py https://huggingface.co/spaces/aliabd/testing-fork-prs/resolve/main/demos/chatinterface_streaming_echo/run.py
260 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).queue() | |
| if __name__ == "__main__": | |
| demo.launch() | |