Download app.py from dev2180/100x: direct link, hf CLI and curl.
- Browser
- Download file 376 Bytes
-
https://huggingface.co/spaces/dev2180/100x/resolve/main/app.py
- Command line
-
hf download hf://spaces/dev2180/100x/app.py
-
curl -L -o app.py https://huggingface.co/spaces/dev2180/100x/resolve/main/app.py
376 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, | |
| flagging_mode="manual", | |
| flagging_options=["Like", "Spam", "Inappropriate", "Other"], | |
| save_history=True, | |
| ) | |
| if __name__ == "__main__": | |
| demo.launch() |