gradio/demo/paramviewer_component/run.py
Abubakar Abid 3c8c4ac2db
Document the gr.ParamViewer component, and fix component preprocessing/postprocessing docstrings (#7116)
* add paramviewer to docs

* add changeset

* type fixing

* round to

* format

* revert to make test pass

* remove msg

* add changeset

* annotated image

* annotated image
push

* audio

* changes

* changes

* audio

* audio

* changes

* remove borders from code

* working

* fixes

* add changeset

* formatting

* build fix

* changes

* ls

* more components

* format

* some more

* more

* component

* plots

* buttons

* simple backend

* number

* more

* more

* simple templates

* format

* fixes

* backend

* fix tests

* fix test

* fixes

* formatting

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: aliabd <ali.si3luwa@gmail.com>
2024-01-31 09:36:21 -08:00

21 lines
531 B
Python

import gradio as gr
with gr.Blocks() as demo:
gr.Markdown("The `round()` function in Python takes two parameters")
gr.ParamViewer(
{
"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()