1818 DEBUG_ENABLED ,
1919 FLOW_DURATION_SAMPLES ,
2020 FLOW_DURATION_THRESHOLD ,
21+ FRONTEND_DIR ,
2122 STATE_ACCUMULATE_WAIT ,
2223)
2324from lightning_app .core .queues import BaseQueue , SingleProcessQueue
2425from lightning_app .frontend import Frontend
2526from lightning_app .storage import Drive , Path
2627from lightning_app .storage .path import storage_root_dir
28+ from lightning_app .utilities import frontend
2729from lightning_app .utilities .app_helpers import _delta_to_app_state_delta , _LightningAppRef , Logger
2830from lightning_app .utilities .commands .base import _process_requests
2931from lightning_app .utilities .component import _convert_paths_after_init , _validate_root_flow
@@ -46,6 +48,7 @@ def __init__(
4648 self ,
4749 root : "lightning_app.LightningFlow" ,
4850 debug : bool = False ,
51+ info : frontend .AppInfo = None ,
4952 ):
5053 """The Lightning App, or App in short runs a tree of one or more components that interact to create end-to-end
5154 applications. There are two kinds of components: :class:`~lightning_app.core.flow.LightningFlow` and
@@ -62,6 +65,8 @@ def __init__(
6265 It must define a `run()` method that the app can call.
6366 debug: Whether to activate the Lightning Logger debug mode.
6467 This can be helpful when reporting bugs on Lightning repo.
68+ info: Provide additional info about the app which will be used to update html title,
69+ description and image meta tags and specify any additional tags as list of html strings.
6570
6671 .. doctest::
6772
@@ -133,6 +138,10 @@ def __init__(
133138
134139 logger .debug (f"ENV: { os .environ } " )
135140
141+ # update index.html,
142+ # this should happen once for all apps before the ui server starts running.
143+ frontend .update_index_file_with_info (FRONTEND_DIR , info = info )
144+
136145 def get_component_by_name (self , component_name : str ):
137146 """Returns the instance corresponding to the given component name."""
138147 from lightning_app .structures import Dict , List
0 commit comments