Spaces:
Running on Zero
Running on Zero
Download app.py from Significant/demo2: direct link, hf CLI and curl.
- Browser
- Download file 378 Bytes
-
https://huggingface.co/spaces/Significant/demo2/resolve/main/app.py
- Command line
-
hf download hf://spaces/Significant/demo2/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Significant/demo2/resolve/main/app.py
378 Bytes
| import gradio as gr | |
| import spaces | |
| def greet(name, intensity): | |
| return "Hello, " + name + "!" * int(intensity) | |
| with gr.Blocks() as demo: | |
| name = gr.Textbox(label="Name") | |
| intensity = gr.Slider(1, 10, value=2) | |
| output = gr.Textbox() | |
| btn = gr.Button("Submit") | |
| btn.click(greet, inputs=[name, intensity], outputs=output) | |
| demo.launch() |