Open MarcSkovMadsen opened 9 months ago
I don't fully understand this issue. Can you clarify what Panel is missing here?
Panel has different Button groups. But they don't serve my purpose because they are associated with one or more options being checked. Also visually.
Isn't your ExampleButtons similar to https://panel.holoviz.org/reference/widgets/RadioButtonGroup.html?
RadioButtons have 1) initial state and 2) visual state. My ExampleButtons don't.
Use Case
Sometimes you want to make it easy for your users to input a value. For example if you have a model and you want your user to try it out.
For example Gradio supports this and uses it extensible for demos of model. See Examples. Please note that their Examples component support more than text buttons. It can be buttons representing any kind of media including audio and video.
Panel has different Button groups. But they don't serve my purpose because they are associated with one or more options being checked. Also visually.
Hack Code
A hack is to develop something like the below. I added an
ExampleSelect
too because that is also used a lot in the Hugging Face/ Gradio universe.https://github.com/holoviz/panel/assets/42288570/20f4bd82-817d-44fa-8268-b14d799bbfd8
Additional Context
I was starting to write a small article about using Panel with Transformers library. But having to show and explain the above to users just makes everything so much more complicated.
Gradio users would assume something like the above is very easy to do.
Note
The options of the
Select
widget in the example above are hard to update dynamically. I could not figure out how to do it.Question
Are we interested in adding missing Gradio functionality like this to Panel?