Socket
Socket
Sign inDemoInstall

gradio-url-buttons

Package Overview
Dependencies
0
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

gradio-url-buttons

Gradio custom compnent for adding URL buttons


Maintainers
1

Readme

gradio_url_buttons

PyPI - Version

Gradio custom compnent for adding URL buttons

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

nametypedefaultdescription
value
Any
NoneNone
label
str | None
NoneNone
info
str | None
NoneNone
show_label
bool | None
NoneNone
container
bool
TrueNone
scale
int | None
NoneNone
min_width
int | None
NoneNone
interactive
bool | None
NoneNone
visible
bool
TrueNone
elem_id
str | None
NoneNone
elem_classes
list[str] | str | None
NoneNone
render
bool
TrueNone
load_fn
Callable | None
NoneNone
every
float | None
NoneNone

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc