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

Static Badge

A path Selector component for Gradio

Installation

pip install gradio_path_selector

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.0.tar.gz (82.6 kB view hashes)

Uploaded Source

Built Distribution

gradio_path_selector-0.1.0-py3-none-any.whl (41.8 kB view hashes)

Uploaded Python 3

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