Spaces:
Running
Running
Download run.py from gradio/deep_link: direct link, hf CLI and curl.
- Browser
- Download file 412 Bytes
-
https://huggingface.co/spaces/gradio/deep_link/resolve/main/run.py
- Command line
-
hf download hf://spaces/gradio/deep_link/run.py
-
curl -L -o run.py https://huggingface.co/spaces/gradio/deep_link/resolve/main/run.py
412 Bytes
| import gradio as gr | |
| import random | |
| def random_response(message, history): | |
| return random.choice(["Hi!", "Hello!", "Greetings!"]) | |
| with gr.Blocks() as demo: | |
| gr.ChatInterface( | |
| random_response, | |
| title="Greeting Bot", | |
| description="Ask anything and receive a nice greeting!", | |
| api_name="chat", | |
| ) | |
| gr.DeepLinkButton() | |
| if __name__ == "__main__": | |
| demo.launch(share=True) | |