Spaces:
Running
Running
Download input.py from wwwillchen/mesop: direct link, hf CLI and curl.
- Browser
- Download file 552 Bytes
-
https://huggingface.co/spaces/wwwillchen/mesop/resolve/main/input.py
- Command line
-
hf download hf://spaces/wwwillchen/mesop/input.py
-
curl -L -o input.py https://huggingface.co/spaces/wwwillchen/mesop/resolve/main/input.py
552 Bytes
| import mesop as me | |
| class State: | |
| input: str = "" | |
| def on_blur(e: me.InputBlurEvent): | |
| state = me.state(State) | |
| state.input = e.value | |
| def load(e: me.LoadEvent): | |
| me.set_theme_mode("system") | |
| def app(): | |
| with me.box(style=me.Style(margin=me.Margin.all(15))): | |
| s = me.state(State) | |
| me.input(label="Basic input", appearance="outline", on_blur=on_blur) | |
| me.text(text=s.input) | |