Skip to main content

Python library for easily interacting with trained machine learning models

Project description

gradio_goodtab

PyPI - Version

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.
key
str | None
None Added for new gradio compatibility, has no effect for now.

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 Distribution

gradio_goodtab-0.0.5.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gradio_goodtab-0.0.5-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file gradio_goodtab-0.0.5.tar.gz.

File metadata

  • Download URL: gradio_goodtab-0.0.5.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.18

File hashes

Hashes for gradio_goodtab-0.0.5.tar.gz
Algorithm Hash digest
SHA256 1e1cce711074eb3dd36adf5411c21be23fa163959f5f0d8b702b8534ebabd358
MD5 4085ae38554ca8dccb61794107a8abe0
BLAKE2b-256 6d722c1c4224a8b4ec3e656e78a3018f5c72928efe4ede0aa3e3c74dd35d558f

See more details on using hashes here.

File details

Details for the file gradio_goodtab-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: gradio_goodtab-0.0.5-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.18

File hashes

Hashes for gradio_goodtab-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0c016bbe0a06544500fd26623bdb83cd37dc2427182eb991b07655111ea0c19b
MD5 e87b9be69497a1be3149134f014b37c5
BLAKE2b-256 d3d553f46b6beabf05176223cb29e2eb65e0655f1e46c7981b2d3ff2f34d3d8d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page