Python library for easily interacting with trained machine learning models
Project description
gradio_url_buttons
Python library for easily interacting with trained machine learning models
Installation
pip install gradio_url_buttons
Usage
import gradio as gr
from gradio_url_buttons import source_buttons
def add_source():
return [{"link": "https://www.github.com", "hostname": "Github.com"}, {"link": "https://www.hkk.de", "hostname": "HKK.de"}]
with gr.Blocks() as demo:
gr.Markdown("# Change the value (keep it JSON) and the front-end will update automatically.")
source_buttons(value=[])
buttons = source_buttons()
click = gr.Button("Click me")
source_buttons(value=[{"link": "https://www.google.com", "hostname": "Google.com"}, {"link": "https://www.hkk.de", "hostname": "HKK.de"}])
click.click(add_source, inputs=[], outputs=[buttons])
if __name__ == "__main__":
demo.launch()
source_buttons
Initialization
name | type | default | description |
---|---|---|---|
value |
Any
|
None |
None |
label |
str | None
|
None |
None |
info |
str | None
|
None |
None |
show_label |
bool | None
|
None |
None |
container |
bool
|
True |
None |
scale |
int | None
|
None |
None |
min_width |
int | None
|
None |
None |
interactive |
bool | None
|
None |
None |
visible |
bool
|
True |
None |
elem_id |
str | None
|
None |
None |
elem_classes |
list[str] | str | None
|
None |
None |
render |
bool
|
True |
None |
load_fn |
Callable | None
|
None |
None |
every |
float | None
|
None |
None |
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_url_buttons-0.0.1.tar.gz
(51.1 kB
view hashes)
Built Distribution
Close
Hashes for gradio_url_buttons-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fca220cdfd04df3e9ff86423a26d6996e2c6a4b05a7255aab907ef17df1709ed |
|
MD5 | 79f05c3d9cbff865c6dc9cd0a505ba60 |
|
BLAKE2b-256 | bef500e09e00ace043d0f8dbb849e4c971d62d634b4e78d6cb005940ea57965a |