Shiny for python: cannot import name 'include_css' from 'shiny'

I'm trying to use an external CSS file but it is not working. Here is the code snip

from shiny import include_css

css_path = www_dir = Path(file).parent / "www" / "bootstrap.min.css"

app_ui = ui.page_navbar(

ui.nav(
    "Navbar 1",
    shinyswatch.theme.flatly(),
    ui.include_css("bootstrap.min.css"),

this giving the following error
from shiny import include_css
ImportError: cannot import name 'include_css' from 'shiny' (C:\Users\nimalir\Anaconda3\envs\shinyapp\lib\site-packages\shiny_init_.py)
Please help me to solve this problem explain me how to use external CSS and HTML file in shiny for python.

Thank you

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.