Spaces:
Sleeping
Sleeping
Download run.py from gradio/paramviewer_component_main: direct link, hf CLI and curl.
- Browser
- Download file 542 Bytes
-
https://huggingface.co/spaces/gradio/paramviewer_component_main/resolve/main/run.py
- Command line
-
hf download hf://spaces/gradio/paramviewer_component_main/run.py
-
curl -L -o run.py https://huggingface.co/spaces/gradio/paramviewer_component_main/resolve/main/run.py
542 Bytes
| import gradio as gr | |
| with gr.Blocks() as demo: | |
| gr.Markdown("The `round()` function in Python takes two parameters") | |
| gr.ParamViewer( | |
| { # type: ignore | |
| "number": { | |
| "type": "int | float", | |
| "description": "The number to round", | |
| "default": None | |
| }, | |
| "ndigits": { | |
| "type": "int", | |
| "description": "The number of digits to round to", | |
| "default": "0" | |
| } | |
| } | |
| ) | |
| if __name__ == "__main__": | |
| demo.launch() | |