Restoration of Gradio 4.x tab functionality for usage in TTS WebUI.
gradio_goodtabs
Python library for easily interacting with trained machine learning models
Installation
pip install gradio_goodtabs
Usage
import gradio as gr
from gradio_goodtabs import GoodTabs
from gradio_goodtab import GoodTab as Tab
# from gradio_goodtabs import GoodTab as Tab
# gr.Tab = Tab
gr.Tabs = GoodTabs
with gr.Blocks() as demo:
with gr.Row():
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 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 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 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 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 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 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 |
GoodTabs
Initialization
| name | type | default | description |
|---|---|---|---|
selected |
int | str | None
|
None |
The currently selected tab. Must correspond to an id passed to the one of the child TabItems. Defaults to the first TabItem. |
visible |
bool
|
True |
If False, GoodTabs will be hidden. |
elem_id |
str | None
|
None |
An optional string that is assigned as the id of this component in the HTML DOM. 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 |
|---|---|
change |
Triggered when the value of the GoodTabs changes either because of user input (e.g. a user types in a textbox) OR because of a function update (e.g. an image receives a value from the output of an event trigger). See .input() for a listener that is only triggered by user input. |
select |
Event listener for when the user selects or deselects the GoodTabs. Uses event data gradio.SelectData to carry value referring to the label of the GoodTabs, and selected to refer to state of the GoodTabs. See EventData documentation on how to use this event data |
Metadata
Release files for tts-webui.gradio-goodtabs 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tts_webui_gradio_goodtabs-0.0.4.tar.gz | 46.0 kB | Without provenance | Details for tts_webui_gradio_goodtabs-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tts_webui_gradio_goodtabs-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for tts_webui_gradio_goodtabs-0.0.4-py3-none-any.whl |
Total release size: 50.1 kB
Release files / tts_webui_gradio_goodtabs-0.0.4.tar.gz
| Download URL | tts_webui_gradio_goodtabs-0.0.4.tar.gz |
|---|---|
| Size | 46.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f5e04d39293e436b58ac1e49aea88e0d2aafbb1a6f8942aec548d62d7e55aa77
|
|
BLAKE2b-256 checksum How to use checksums |
c3a4cf1ecbcaccf65b5065a45ad278abd9666451c212b3baf8498482f0f322df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Release files / tts_webui_gradio_goodtabs-0.0.4-py3-none-any.whl
| Download URL | tts_webui_gradio_goodtabs-0.0.4-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5dd68291a4b7c1dcf3753e5b2ea59865dadb1ea7aa6683354888bdabaa1a80ff
|
|
BLAKE2b-256 checksum How to use checksums |
5a8c7e98005a9238e3bc1f3a9bf1a4399f7a36a6074a29f442dd4ac538cf2848
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Security for tts-webui.gradio-goodtabs 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.