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
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
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.1.tar.gz
(83.1 kB
view hashes)
Built Distribution
Close
Hashes for gradio_path_selector-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b9d0184ed1f35eaeee682f01209693d2fbde9ca7b563a5d362927e965895e87 |
|
MD5 | f5dd963eddf794320bc78242612d8d26 |
|
BLAKE2b-256 | e0dbd871e20faef67725fb70dc02c7a24f7ca2f7778c9cbd389b59120ba99cb9 |
Close
Hashes for gradio_path_selector-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 649412cb2ce0a956869e046f9cc112cd93d2e68b226f42ce7809a76678212710 |
|
MD5 | 9281f851b555de8c85076a7114faae47 |
|
BLAKE2b-256 | 2a3a145f3721af7d2b4bd1c2c8951a403fcc42a59be3c650fe5d61920a5a43ef |