Skip to content

ComputaCo/lmi

Repository files navigation

LMI

Interfaces for AI

Usage

from lmi import component, app, use_state

@component
def MyButton(text, on_click):
    if len(text) > 10:
        raise ValueError("Text is too long")

    return [
        text,
        on_click
    ]

class CustomComponent(Component):
    def render(self) -> str:
        ...

@app
def MyApp():

    text, setText = use_state("click me")

    return [
        "Hello",
        MyButton(text, on_click=lambda: setText("clicked!"))
    ]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages