Skip to main content

A path Selector component for Gradio

Project description


tags: [gradio-path-selector, ] title: gradio_path_selector short_description: A gradio Path Selector colorFrom: blue colorTo: yellow sdk: gradio pinned: false app_file: space.py

gradio_path_selector

PyPI - Version Static Badge

A path Selector component for Gradio

Installation

pip install gradio_path_selector

Build from source

git clone https://github.com/ncassereau-idris/gradio_path_selector
cd gradio_path_selector
make build
pip install dist/gradio_path_selector-*-py3-none-any.whl

Usage

import gradio as gr

from gradio_path_selector import PathSelector


with gr.Blocks() as demo:
    PathSelector()

if __name__ == "__main__":
    demo.launch()

PathSelector

Initialization

name type default description
value
str | Callable | None
None default text to provide in textbox. If callable, the function will be called whenever the app loads to set the initial value of the component.
placeholder
str | None
None placeholder hint to provide behind textbox.
label
str | None
None component name in interface.
every
Timer | float | None
None Continously calls `value` to recalculate it if `value` is a function (has no effect otherwise). Can provide a Timer whose tick resets `value`, or a float that provides the regular interval for the reset Timer.
show_label
bool | None
None if True, will display label.
scale
int | None
None relative size compared to adjacent Components. For example if Components A and B are in a Row, and A has scale=2, and B has scale=1, A will be twice as wide as B. Should be an integer. scale applies in Rows, and to top-level Components in Blocks where fill_height=True.
min_width
int
160 minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
visible
bool
True If False, component 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 list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
render
bool
True If False, component will not render be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.
key
int | str | None
None if assigned, will be used to assume identity across a re-render. Components that have the same key across a re-render will have their value preserved.

Events

name description
change Triggered when the value of the PathSelector 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.

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_path_selector-0.1.3.tar.gz (83.2 kB view details)

Uploaded Source

Built Distribution

gradio_path_selector-0.1.3-py3-none-any.whl (42.0 kB view details)

Uploaded Python 3

File details

Details for the file gradio_path_selector-0.1.3.tar.gz.

File metadata

  • Download URL: gradio_path_selector-0.1.3.tar.gz
  • Upload date:
  • Size: 83.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for gradio_path_selector-0.1.3.tar.gz
Algorithm Hash digest
SHA256 9507e00318586ec751da1754152a3fb3a028e6b482eaa92cac3b3dff1e90c0e8
MD5 49dd5c81d9846886b6338d0c4d760a37
BLAKE2b-256 4e894220c2487d844cf65616847c610516e297279f29f113183b6594d1998e9d

See more details on using hashes here.

File details

Details for the file gradio_path_selector-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for gradio_path_selector-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c7f08e3e8e396372d93625759fe8b306e98e3f629874b8480f7754983f2a7701
MD5 f6e88c676581d97da1b5ce53dc7b37d8
BLAKE2b-256 655fa4e8123c64f68a23d42348c9f5491b11beb5089c008990035045ac1e78c7

See more details on using hashes here.

Supported by

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