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
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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for gradio_path_selector-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3643e30835164659ccc6c3f10c1c57a6940eb1865e429fb010d8eae91bce4b2 |
|
MD5 | 03e04f6ace2e1affd1699cb0e7b8c2b3 |
|
BLAKE2b-256 | 27a08ce072e6d339ee1b06640f261c1029ed6aa9b68a446f4fd4d0fb1b18354b |
Close
Hashes for gradio_path_selector-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a55ac83ddbcf4f9c3aaeeb0b423eceaa393ec828d90ffee499c245b55aedacf |
|
MD5 | 8cbae4e09ccb53094d9a1ae0cf25f41b |
|
BLAKE2b-256 | db027edb88218dc200053e525c6e3ae2b0a1b8e9c309d10c822bd5c5538e0aec |