Skip to content

Support for HoloViz Panel #85

@ahuang11

Description

@ahuang11

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions