Python library for easily interacting with trained machine learning models
Project description
gradio_goodtab
Python library for easily interacting with trained machine learning models
Installation
pip install gradio_goodtab
Usage
import gradio as gr
from gradio_goodtabs import GoodTabs
from gradio_goodtab import GoodTab as Tab
# gr.Tab = Tab
# gr.Tabs = GoodTabs
with gr.Blocks() as demo:
with gr.Row():
# with gr.Tabs():
with GoodTabs():
with Tab("Tab 1 long long long long long long long long long"):
gr.Textbox(value="foo", interactive=True)
with Tab("Tab 1 long long long long long long long long long"):
gr.Textbox(value="foo", interactive=True)
# with gr.Tab("Tab 1 long long long long long long long long long"):
# gr.Textbox(value="foo", interactive=True)
# with gr.Tab("Tab 1 long long long long long long long long long"):
# gr.Textbox(value="foo", interactive=True)
# with gr.Tab("Tab 1 long long long long long long long long long"):
# gr.Textbox(value="foo", interactive=True)
# with gr.Tab("Tab 1 long long long long long long long long long"):
# gr.Textbox(value="foo", interactive=True)
# with gr.Tab("Tab 2"):
# gr.Number(value=10, interactive=True)
if __name__ == "__main__":
demo.launch()
GoodTab
Initialization
| name | type | default | description |
|---|---|---|---|
label |
str | None
|
None |
The visual label for the tab |
visible |
bool
|
True |
If False, Tab will be hidden. |
interactive |
bool
|
True |
If False, Tab will not be clickable. |
id |
int | str | None
|
None |
An optional identifier for the tab, required if you wish to control the selected tab from a predict function. |
elem_id |
str | None
|
None |
An optional string that is assigned as the id of the containing the contents of the Tab layout. The same string followed by "-button" is attached to the Tab button. Can be used for targeting CSS styles. |
elem_classes |
list[str] | str | None
|
None |
An optional string or list of strings that are assigned as the class of this component in the HTML DOM. Can be used for targeting CSS styles. |
render |
bool
|
True |
If False, this layout will not be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later. |
Events
| name | description |
|---|---|
select |
Event listener for when the user selects or deselects the GoodTab. Uses event data gradio.SelectData to carry value referring to the label of the GoodTab, and selected to refer to state of the GoodTab. See EventData documentation on how to use this event data |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gradio_goodtab-0.0.2-py3-none-any.whl.
File metadata
- Download URL: gradio_goodtab-0.0.2-py3-none-any.whl
- Upload date:
- Size: 1.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dca918be06f80657ab5fb2bd15a1339c278055a1cbb96ba98245520231717aba
|
|
| MD5 |
f07239d24f09800262cbd104baa2c0e5
|
|
| BLAKE2b-256 |
78e65e89e4b31cc1c0511460b4d20624619ae62e65c1ae1df8ce019b1819ae3c
|