mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-27 01:40:20 +08:00
3c8c4ac2db
* 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>
21 lines
531 B
Python
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() |