Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for HoloViz Panel #85

Open
ahuang11 opened this issue May 19, 2024 · 1 comment
Open

Support for HoloViz Panel #85

ahuang11 opened this issue May 19, 2024 · 1 comment

Comments

@ahuang11
Copy link

ahuang11 commented May 19, 2024

Hi! Love the idea of using typing to create widgets (Panel sort of already does this, but not with native Python types).

I'd love to get Panel working with this!

Copying the example from homepage and replacing ipywidgets with Panel:

import typing # Python native 

import panel as pn  # popular UI library 

def input_widgets_basic(
    prompt: str = "Who is Oppenheimer?",
    advanced_features: bool = True,
    model: typing.Literal['GPT-3.5', 'GPT-4.0', 'Falcon-7B'] = 'GPT-4.0',
    max_token: range(100, 200, 20) = 140,
    openai_key: pn.widgets.PasswordInput = "1234556",
    )  -> str:
    pass


input_widgets_basic()

I get this
image

Instead of:
image

@ahuang11 ahuang11 changed the title Support for Panel Support for HoloViz Panel May 19, 2024
@ahuang11
Copy link
Author

ahuang11 commented May 19, 2024

After talking to Forrest, I think param is probably more suitable since funix is mapping types to widgets, rather than using ipywidgets widgets.

However, maybe Panel can be used as a separate backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant