google / mesop
- суббота, 8 июня 2024 г. в 00:00:05
Mesop is a Python-based UI framework that allows you to rapidly build web apps like demos and internal apps:
Intuitive for UI novices ✨
Frictionless developer workflows 🏎️
Flexible for delightful demos 🤩
import time
import mesop as me
import mesop.labs as mel
@me.page(path="/text_to_text", title="Text I/O Example")
def app():
mel.text_to_text(
upper_case_stream,
title="Text I/O Example",
)
def upper_case_stream(s: str):
yield s.capitalize()
time.sleep(0.5)
yield "Done"
You can try Mesop on Colab!
Step 1: Install it
$ pip install mesop
Step 2: Copy the example above into main.py
Step 3: Run the app
$ mesop main.py
Learn more in Getting Started.
This is not an officially supported Google product.