-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document the
gr.ParamViewer
component, and fix component preprocess…
…ing/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 <[email protected]> Co-authored-by: aliabd <[email protected]>
- Loading branch information
1 parent
60078df
commit 3c8c4ac
Showing
54 changed files
with
833 additions
and
382 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"gradio": minor | ||
"gradio_client": minor | ||
"website": minor | ||
--- | ||
|
||
feat:Document the `gr.ParamViewer` component, and fix component preprocessing/postprocessing docstrings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: paramviewer_component"]}, {"cell_type": "code", "execution_count": null, "id": "272996653310673477252411125948039410165", "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": "288918539441861185822528903084949547379", "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "\n", "with gr.Blocks() as demo:\n", " gr.Markdown(\"The `round()` function in Python takes two parameters\")\n", " gr.ParamViewer(\n", " {\n", " \"number\": { \n", " \"type\": \"int | float\", \n", " \"description\": \"The number to round\", \n", " \"default\": None\n", " },\n", " \"ndigits\": { \n", " \"type\": \"int\", \n", " \"description\": \"The number of digits to round to\", \n", " \"default\": \"0\"\n", " }\n", " }\n", " )\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.