This component lets you make posters from Markdown to the Lightning app.
from lightning.app import LightningFlow, LightningApp
from poster import Poster
class CustomPosterApp(LightningFlow):
def __init__(self):
super().__init__()
self.poster = Poster(resource_dir="resources")
def run(self):
self.poster.run()
def configure_layout(self):
return {"name": "Poster", "content": self.poster.url + "/poster.html"}
if __name__ == "__main__":
app = LightningApp(CustomPosterApp())
Use these instructions to install:
lightning install component lightning/lit-markdown-poster
git clone https://github.com/PyTorchLightning/markdown-poster.git
cd markdown-poster
pip install -e .
Learn more about this here